com.ibm.commerce.foundation.dataload.config

Class AbstractTableHandler

  • java.lang.Object
    • com.ibm.commerce.foundation.dataload.config.AbstractTableHandler
  • All Implemented Interfaces:
    TableHandler


    public abstract class AbstractTableHandler
    extends java.lang.Object
    implements TableHandler
    This is an abstract class to implement the TableHandler interface. All implementation classes of TableHandler should extend this class. If the subclass overwrite any method, it should call the super first in case this class implements some default logic.
    • Constructor Detail

      • AbstractTableHandler

        public AbstractTableHandler()
    • Method Detail

      • init

        public void init()
                  throws DataLoadException
        It does nothing. The subclass can overwrite this method to do some initialization, such as creating some prepared statements to access the database.
        Specified by:
        init in interface TableHandler
        Throws:
        DataLoadException - if there are some errors.
      • preProcess

        public void preProcess(ExtendedTableDataObject extendedTableDataObject)
                        throws DataLoadException
        It does nothing. The subclass can overwrite it to provide some addition handling.
        Specified by:
        preProcess in interface TableHandler
        Parameters:
        extendedTableDataObject - an extended table data object.
        Throws:
        DataLoadException - if there are some errors to execute the custom logic.
      • close

        public void close()
        It does nothing. The subclass can overwrite this method to release any resources it used, such as JDBC prepared statements.
        Specified by:
        close in interface TableHandler
      • setDeleteFlag

        public void setDeleteFlag(boolean deleteFlag)
        Sets the delete flag. This flag will be used in the methods createTableDataObjectWithPrimary() and createTableDataObjectWithUniqueIndex() to indicate whether we need to set the operational mode to delete for the created table data object.
        Specified by:
        setDeleteFlag in interface TableHandler
        Parameters:
        deleteFlag - a boolean flag.