Package net.simplace.pipe.processors
Class SQLStatementProcessor
java.lang.Object
net.simplace.pipe.control.FWProcessor
net.simplace.pipe.processors.SQLStatementProcessor
This processor performs SQL-Statements on a existing Database
Furthermore following configuration is expected (as a subelement in processor element in
the configuration file) to describe the concrete data, that shall be read.
Use normal parameterTags such as
SQL STATEMENT
UPDATE ${some.variable} SET ...
if a result is requested, use only one statement (#0)! Result will be packed to given Classtype.
Parameter | Description |
---|---|
db_conn |
JDBC Connection from Pipeline. |
#1 , #2 , #3 , ... |
SQL statments to process (e.g. SELECT or UPDATE or DROP table). For SELECT statements the following parameters resultParamtKey and
resultParamClass should be used to specify the SQL statement return type and output parameter key. |
OUT: resultParamKey or #0.resultParamKey ,#1.resultParamKey ,... |
(optional) if Statement should produce a result saved to pipeline, set this key. If multiple SELECT statements are processed within the processor call, the "#X."- prefix can be used to specify individual output parameter keys for each SELECT statement. If prefix is missing only one single SELECT statement can be processed (because multiple would all use the same output parameter key!) |
resultParamClass or #0.resultParamClass ,#1.resultParamClass ,... |
(optional) if Statement should produce a result saved to pipeline, set this with needed classname Default: java.lang.String If multiple SELECT statements are processed within the processor call, the "#X."- prefix can be used to specify individual output classes for each SELECT statement. For all SELECT statement the prefix is missing, the general prefix-less parameter resultParamClass is used. |
- Author:
- Andreas Enders
-
Field Summary
Fields inherited from class net.simplace.pipe.control.FWProcessor
iAllreadyLoopedCount, iContainer, iInObservable, iObservable, iProgressTasks
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether the in-channel contains all required parameters.protected boolean
process()
Must be overridden to implement concrete pipe procedure.Methods inherited from class net.simplace.pipe.control.FWProcessor
checkOutParameterMap, clone, containsParameter, createProcessor, createProcessor, fireTaskEvent, getAllStringInParameters, getConfiguration, getInitialParameters, getInParameter, getInParameter, getInParameters, getNewProgressTask, getOutParameter, getOutParameterKeys, getPipeLine, getProgressTask, getStringInParameter, getStringInParameter, getSystemID, hasConfiguration, isEndOfPipe, pipe, removeOutParameter, setConfiguration, setEndOfPipeFlag, setInitialParameters, setInParameterMap, setLoopedCount, setOutParameter, setStateOfTask, setStateProgressing, toXML
-
Constructor Details
-
SQLStatementProcessor
public SQLStatementProcessor()
-
-
Method Details
-
process
Description copied from class:FWProcessor
Must be overridden to implement concrete pipe procedure.- Specified by:
process
in classFWProcessor
- Returns:
- success
- Throws:
PipeLineException
-
checkInParameterMap
public boolean checkInParameterMap()Checks whether the in-channel contains all required parameters.- Overrides:
checkInParameterMap
in classFWProcessor
- Returns:
- true if not overridden by implementations
-