Class JDBCOINode

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

public class JDBCOINode extends OINode implements JDBCOIConfigFieldsIfc
This class represents the generic JDBC OI node. It is responsible for constructing the various components used to write the incoming NARs to the configured database.

This node obtains the database 'schema' information from the NPL file it is configured to use. The NPL file must contain a Configuration clause containing a configuration key of 'DBTables' and an associated configuration value representing a list of one or more database table names. This comma-separated list of names correspond to the database tables into which the incoming NAR attributes will be inserted. An example Config is shown below:

Config { DBTables "tableName1,tableName2"; }

For each table in the list, there must also be a corresponding Expose clause, which will associate attributes of the output record(s) to the appropriate column within the specified database table. Please note, the data type of the output attribute should be compatible with the data type for the database column, as this node will throw a processing exception if the data types are incompatible. An example Expose clause is shown below:

Expose for tableName1 { out.attribute1 "column1"; out.attribute2 "column2"; out.attribute3 "column3"; out.attribute4 "column4"; out.attribute5 "column5"; }

  • Field Details

  • Constructor Details

    • JDBCOINode

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

      public JDBCOINode(String[] args) throws NodeStartException
      Constructor for the class. Calls the super class OINode 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()
      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 DCNode
    • 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 generic JDBC OI 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 generic JDBC OI Config Data GUI class.
      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.
    • restoreState

      public void restoreState()
      Tells the Node to restore its state from disk.
      Specified by:
      restoreState in interface StateManagementIfc
      Overrides:
      restoreState in class DCNode
    • saveState

      public void saveState()
      Tells the Node to save its state to disk.
      Specified by:
      saveState in interface StateManagementIfc
      Overrides:
      saveState in class DCNode