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.AbstractDatabaseConnection
m_DatabaseConnection
the 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.AbstractDatabaseConnection
getDatabaseConnection()
Returns the currently used database connection object, can be null.protected abstract adams.db.AbstractDatabaseConnection
getDefaultDatabaseConnection()
Returns the default database connection.protected void
initialize()
Initializes the members.void
setDatabaseConnection(adams.db.AbstractDatabaseConnection value)
Sets the database connection object to use.protected void
updateDatabaseConnection()
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:
initialize
in 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:
getDatabaseConnection
in interfaceadams.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 interfaceadams.db.DatabaseConnectionHandler
- Parameters:
value
- the object to use
-
updateDatabaseConnection
protected void updateDatabaseConnection()
Updates the database connection in dependent schemes.
Default implementation does nothing.
-
-