Class SQLStatementProcessor

java.lang.Object
net.simplace.pipe.control.FWProcessor
net.simplace.pipe.processors.SQLStatementProcessor

public class SQLStatementProcessor extends FWProcessor
This processor performs SQL-Statements on a existing Database
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.
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.
Author:
Andreas Enders
  • Constructor Details

    • SQLStatementProcessor

      public SQLStatementProcessor()
  • Method Details

    • process

      protected boolean process() throws PipeLineException
      Description copied from class: FWProcessor
      Must be overridden to implement concrete pipe procedure.
      Specified by:
      process in class FWProcessor
      Returns:
      success
      Throws:
      PipeLineException
    • checkInParameterMap

      public boolean checkInParameterMap()
      Checks whether the in-channel contains all required parameters.
      Overrides:
      checkInParameterMap in class FWProcessor
      Returns:
      true if not overridden by implementations