Package adams.data.featuregenerator
Class AbstractDatabaseConnectionFeatureGenerator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.featuregenerator.AbstractFeatureGenerator
-
- adams.data.featuregenerator.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 Summary
Fields Modifier and Type Field Description protected adams.db.AbstractDatabaseConnectionm_DatabaseConnectionthe database connection.-
Fields inherited from class adams.data.featuregenerator.AbstractFeatureGenerator
m_Prefix, PREFIX_FEATURE
-
-
Constructor Summary
Constructors Constructor Description AbstractDatabaseConnectionFeatureGenerator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description adams.db.AbstractDatabaseConnectiongetDatabaseConnection()Returns the currently used database connection object, can be null.protected abstract adams.db.AbstractDatabaseConnectiongetDefaultDatabaseConnection()Returns the default database connection.protected voidinitialize()Initializes the members.voidsetDatabaseConnection(adams.db.AbstractDatabaseConnection value)Sets the database connection object to use.protected voidupdateDatabaseConnection()Updates the database connection in dependent schemes.-
Methods inherited from class adams.data.featuregenerator.AbstractFeatureGenerator
addFeature, addFeature, checkData, cleanUp, compareTo, defineOptions, equals, forCommandLine, forName, generate, getDefaultPrefix, getGenerators, getPrefix, prefixTipText, processData, reset, setPrefix, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classadams.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:
getDatabaseConnectionin interfaceadams.db.DatabaseConnectionProvider- Returns:
- the current object
-
setDatabaseConnection
public void setDatabaseConnection(adams.db.AbstractDatabaseConnection value)
Sets the database connection object to use.- Specified by:
setDatabaseConnectionin interfaceadams.db.DatabaseConnectionHandler- Parameters:
value- the object to use
-
updateDatabaseConnection
protected void updateDatabaseConnection()
Updates the database connection in dependent schemes.
Default implementation does nothing.
-
-