Class AbstractDatabaseConnectionFeatureGenerator

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.ShallowCopySupporter<AbstractFeatureGenerator>, adams.core.SizeOfHandler, adams.db.DatabaseConnectionHandler, adams.db.DatabaseConnectionProvider, adams.db.DatabaseConnectionUser, Serializable, Comparable
    Direct Known Subclasses:
    FilteredFeatureGenerator, MultiGenerator

    public abstract class AbstractDatabaseConnectionFeatureGenerator
    extends AbstractFeatureGenerator
    implements adams.db.DatabaseConnectionHandler
    Ancestor for feature generators that require database access.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_DatabaseConnection

        protected adams.db.AbstractDatabaseConnection m_DatabaseConnection
        the database connection.
    • Constructor Detail

      • AbstractDatabaseConnectionFeatureGenerator

        public AbstractDatabaseConnectionFeatureGenerator()
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class adams.core.option.AbstractOptionHandler
      • getDefaultDatabaseConnection

        protected abstract adams.db.AbstractDatabaseConnection getDefaultDatabaseConnection()
        Returns the default database connection.
        Returns:
        the default database connection
      • getDatabaseConnection

        public adams.db.AbstractDatabaseConnection getDatabaseConnection()
        Returns the currently used database connection object, can be null.
        Specified by:
        getDatabaseConnection in interface adams.db.DatabaseConnectionProvider
        Returns:
        the current object
      • setDatabaseConnection

        public void setDatabaseConnection​(adams.db.AbstractDatabaseConnection value)
        Sets the database connection object to use.
        Specified by:
        setDatabaseConnection in interface adams.db.DatabaseConnectionHandler
        Parameters:
        value - the object to use
      • updateDatabaseConnection

        protected void updateDatabaseConnection()
        Updates the database connection in dependent schemes.

        Default implementation does nothing.