Class JDBCEINode

All Implemented Interfaces:
JDBCEIConfigFieldsIfc, AdminIfc, ConfigIfc, LoggerIfc, NodeHealthIfc, NodeStateManagementIfc, PropertyIfc, JDBCNodeConfigFieldsIfc, StateManagementIfc

public class JDBCEINode extends EINode implements JDBCEIConfigFieldsIfc
This node provides the ability to select data from a JDBC-compliant database to be processed by the UDC application. The node supports queries from a single table. The query is dependent upon configuration information contained within the node's NPL file, as described below.

Using the 'Config' clause, specify the name of the database table from which the data will be selected. The syntax for the 'DB_Table' key/value pair is shown below:

DB_Table "tableName";

Expressions to be used in the WHERE clause of the SELECT statement may be specified within the 'Config' clause. To do so, the 'WhereExprCount' item must be set to the number of expressions that are defined. Each expression must then be defined as a new config item, as shown below. When the WHERE clause is constructed from these expressions, they will be joined by the logical operator 'AND'. The expression syntax should comply with the underlying database.

WhereExprCount "3"; WhereExpr_1 "column1 > 0"; WhereExpr_2 "column1 invalid input: '<' 10"; WhereExpr_3 "column2 = 'testString'";

To prevent duplicate rows being retrieved by subsequent queries, a column containing a timestamp or unique numeric identifier must be specified. This column will be used in the WHERE clause of the SELECT statement to filter new rows from previously selected rows. For example:

SELECT * FROM dbTable WHERE timeColumn > AND timeColumn invalid input: '<'= - or - SELECT * FROM dbTable WHERE uniqueIDColumn >

The / or values will be tracked by the CC and used as parameters to the SELECT statement at the time of the query. Using the 'Config' clause, specify the column to use as a filter and its type, as shown below. If not specified, the rows selected will be dependent upon any WHERE clause expressions defined in the 'Config' clause.

FilterType "0"; (0 = timestamp, 1 = unique identifier) FilterColumn "columnName";

If supported by the underlying database, an ORDER BY clause may be defined within the 'Config' clause. The defined clause should comply with the required syntax of the database. For example:

OrderBy "column1 asc, column2 desc";

  • Constructor Details

    • JDBCEINode

      public JDBCEINode()
      Default Constructor; instantiates objects necessary to define the DCNodeTypeIfc methods.
    • JDBCEINode

      public JDBCEINode(String[] args) throws NodeStartException
      Constructor for the class. Calls the super class EINode with the given array of arguments.
      Parameters:
      args - Arguments to be passed to the DCNode super class.
      Throws:
      NodeStartException
  • Method Details

    • backup

      public void backup()
      Performs the necessary tasks to create a backup of the incoming or outgoing data. This task is initiated by the node manager periodically, if the node is configured to be backed up.
      Overrides:
      backup in class DCNode
    • reconfigure

      public void reconfigure() throws NodeStartException
      Performs the necessary tasks to reconfigure the node while it is running. This task is initiated by the node manager.
      Specified by:
      reconfigure in interface AdminIfc
      Overrides:
      reconfigure in class EINode
      Throws:
      NodeStartException
    • shutdown

      public void shutdown()
      Performs the necessary tasks to properly shutdown the node.
      Specified by:
      shutdown in interface AdminIfc
      Overrides:
      shutdown in class DCNode
    • getMinorType

      public String getMinorType()
      Returns the type name of the EI node.
      Specified by:
      getMinorType in class DCNode
      Returns:
      Returns the minor type identifier for this node.
    • getConfigDataGuiClass

      public String getConfigDataGuiClass()
      Returns the name of the Config Data GUI class for this node.
      Specified by:
      getConfigDataGuiClass in class DCNode
      Returns:
      Returns the class name of the DCNodeConfigGUI object used by the node.
    • main

      public static void main(String[] args)
      This method is useful for development and debugging purposes. Within the application, however, the main() method is never used.