adams.data.featuregenerator
Class AbstractDatabaseConnectionFeatureGenerator

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.data.featuregenerator.AbstractFeatureGenerator
              extended by adams.data.featuregenerator.AbstractDatabaseConnectionFeatureGenerator
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, ShallowCopySupporter<AbstractFeatureGenerator>, SizeOfHandler, DatabaseConnectionHandler, DatabaseConnectionProvider, Serializable, Comparable
Direct Known Subclasses:
FilteredFeatureGenerator, MultiGenerator

public abstract class AbstractDatabaseConnectionFeatureGenerator
extends AbstractFeatureGenerator
implements DatabaseConnectionHandler

Ancestor for feature generators that require database access.

Version:
$Revision: 6027 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
protected  AbstractDatabaseConnection m_DatabaseConnection
          the database connection.
 
Fields inherited from class adams.data.featuregenerator.AbstractFeatureGenerator
m_Prefix, PREFIX_FEATURE
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
AbstractDatabaseConnectionFeatureGenerator()
           
 
Method Summary
 AbstractDatabaseConnection getDatabaseConnection()
          Returns the currently used database connection object, can be null.
protected abstract  AbstractDatabaseConnection getDefaultDatabaseConnection()
          Returns the default database connection.
protected  void initialize()
          Initializes the members.
 void setDatabaseConnection(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, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, globalInfo, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut, sizeOf
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_DatabaseConnection

protected AbstractDatabaseConnection m_DatabaseConnection
the database connection.

Constructor Detail

AbstractDatabaseConnectionFeatureGenerator

public AbstractDatabaseConnectionFeatureGenerator()
Method Detail

initialize

protected void initialize()
Initializes the members.

Overrides:
initialize in class AbstractOptionHandler

getDefaultDatabaseConnection

protected abstract AbstractDatabaseConnection getDefaultDatabaseConnection()
Returns the default database connection.

Returns:
the default database connection

getDatabaseConnection

public AbstractDatabaseConnection getDatabaseConnection()
Returns the currently used database connection object, can be null.

Specified by:
getDatabaseConnection in interface DatabaseConnectionProvider
Returns:
the current object

setDatabaseConnection

public void setDatabaseConnection(AbstractDatabaseConnection value)
Sets the database connection object to use.

Specified by:
setDatabaseConnection in interface DatabaseConnectionHandler
Parameters:
value - the object to use

updateDatabaseConnection

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

Default implementation does nothing.



Copyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.