Package org.drools.template.jdbc
Class ResultSetGenerator
java.lang.Object
org.drools.template.jdbc.ResultSetGenerator
A Drools template compiler which takes a ResultSet and compiles it into a template using DefaultTemplateContainer.
To use simply you need a JDBC ResultSet - with the field names mapping to the field names used in the template !-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcloseStream(InputStream stream) compile(ResultSet rs, InputStream templateStream) Generates DRL from a data provider for the spreadsheet data and templates.Generates DRL from a data provider for the spreadsheet data and templates.compile(ResultSet rs, TemplateDataListener listener) Generates DRL from a data provider for the spreadsheet data and templates.voidnewCell(List<DataListener> listeners, int row, int column, String value, int mergedColStart)
-
Constructor Details
-
ResultSetGenerator
public ResultSetGenerator()
-
-
Method Details
-
compile
Generates DRL from a data provider for the spreadsheet data and templates.- Parameters:
rs- the resultset for the table datatemplate- the string containing the template resource name- Returns:
- the generated DRL text as a String
-
compile
Generates DRL from a data provider for the spreadsheet data and templates.- Parameters:
rs- the resultset for the table datatemplateStream- the InputStream for reading the templates- Returns:
- the generated DRL text as a String
-
compile
Generates DRL from a data provider for the spreadsheet data and templates.- Parameters:
rs- the resultset for the table datalistener- a template data listener- Returns:
- the generated DRL text as a String
-
newCell
public void newCell(List<DataListener> listeners, int row, int column, String value, int mergedColStart) -
closeStream
-