Package adams.flow.source
Class AbstractDatabaseMetaData
-
- All Implemented Interfaces:
AdditionalInformationHandler
,CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,ShallowCopySupporter<Actor>
,SizeOfHandler
,Stoppable
,StoppableWithFeedback
,VariablesInspectionHandler
,DatabaseConnectionUser
,VariableChangeListener
,Actor
,ErrorHandler
,OutputProducer
,Serializable
,Comparable
- Direct Known Subclasses:
DatabaseMetaData
public abstract class AbstractDatabaseMetaData extends AbstractSimpleDbSource
Ancestor for sources that output the database meta-data.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected MetaDataType
m_MetaDataType
the type of meta-data to return.protected String
m_Table
the table to retrieve the information for.protected AbstractTypeMapper
m_TypeMapper
the type mapper to use.-
Fields inherited from class adams.flow.source.AbstractSimpleDbSource
m_DatabaseConnection
-
Fields inherited from class adams.flow.source.AbstractSimpleSource
m_OutputToken
-
Fields inherited from class adams.flow.core.AbstractActor
m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_Executing, m_ExecutionListeningSupporter, m_FullName, m_LoggingPrefix, m_Name, m_Parent, m_ScopeHandler, m_Self, m_Silent, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
Fields inherited from interface adams.flow.core.Actor
FILE_EXTENSION, FILE_EXTENSION_GZ
-
-
Constructor Summary
Constructors Constructor Description AbstractDatabaseMetaData()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.Class[]
generates()
Returns the class of objects that it generates.protected abstract AbstractDatabaseConnection
getDatabaseConnection()
Determines the database connection in the flow.MetaDataType
getMetaDataType()
Returns the type of meta-data to retrieve.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.String
getTable()
Returns the table to retrieve the information for.AbstractTypeMapper
getTypeMapper()
Returns the type mapper in use.String
globalInfo()
Returns a string describing the object.String
metaDataTypeTipText()
Returns the tip text for this property.protected String
queryDatabase()
Performs the actual database query.void
setMetaDataType(MetaDataType value)
Sets the type of meta-data to retrieve.void
setTable(String value)
Sets the table to retrieve the information for.void
setTypeMapper(AbstractTypeMapper value)
Sets the type mapper to use.String
tableTipText()
Returns the tip text for this property.String
typeMapperTipText()
Returns the tip text for this property.-
Methods inherited from class adams.flow.source.AbstractSimpleDbSource
doExecute, getDefaultDatabaseConnection, initialize, setUpDatabaseConnection, wrapUp
-
Methods inherited from class adams.flow.source.AbstractSimpleSource
hasPendingOutput, output, reset
-
Methods inherited from class adams.flow.core.AbstractActor
annotationsTipText, backupState, canInspectOptions, canPerformSetUpCheck, cleanUp, compareTo, configureLogger, destroy, equals, execute, finalUpdateVariables, findVariables, findVariables, forceVariables, forCommandLine, forName, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, handleException, hasErrorHandler, hasStopMessage, index, isBackedUp, isExecuted, isExecuting, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, performVariableChecks, postExecute, preExecute, pruneBackup, pruneBackup, restoreState, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, setUp, setVariables, shallowCopy, shallowCopy, silentTipText, sizeOf, skipTipText, stopExecution, stopExecution, stopFlowOnErrorTipText, updateDetectedVariables, updatePrefix, updateVariables, variableChanged
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.flow.core.Actor
cleanUp, compareTo, destroy, equals, execute, findVariables, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, hasErrorHandler, hasStopMessage, index, isExecuted, isFinished, isHeadless, isStopped, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, setUp, setVariables, shallowCopy, shallowCopy, sizeOf, stopExecution, stopExecution, toCommandLine, variableChanged
-
Methods inherited from interface adams.core.AdditionalInformationHandler
getAdditionalInformation
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager
-
Methods inherited from interface adams.core.VariablesInspectionHandler
canInspectOptions
-
-
-
-
Field Detail
-
m_TypeMapper
protected AbstractTypeMapper m_TypeMapper
the type mapper to use.
-
m_MetaDataType
protected MetaDataType m_MetaDataType
the type of meta-data to return.
-
m_Table
protected String m_Table
the table to retrieve the information for.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractActor
-
setTypeMapper
public void setTypeMapper(AbstractTypeMapper value)
Sets the type mapper to use.- Parameters:
value
- the mapper
-
getTypeMapper
public AbstractTypeMapper getTypeMapper()
Returns the type mapper in use.- Returns:
- the mapper
-
typeMapperTipText
public String typeMapperTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setMetaDataType
public void setMetaDataType(MetaDataType value)
Sets the type of meta-data to retrieve.- Parameters:
value
- the type
-
getMetaDataType
public MetaDataType getMetaDataType()
Returns the type of meta-data to retrieve.- Returns:
- the type
-
metaDataTypeTipText
public String metaDataTypeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setTable
public void setTable(String value)
Sets the table to retrieve the information for.- Parameters:
value
- the table
-
getTable
public String getTable()
Returns the table to retrieve the information for.- Returns:
- the table
-
tableTipText
public String tableTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceActor
- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractActor
- Returns:
- null if no info available, otherwise short string
-
generates
public Class[] generates()
Returns the class of objects that it generates.- Returns:
- the Class of the generated tokens
-
getDatabaseConnection
protected abstract AbstractDatabaseConnection getDatabaseConnection()
Determines the database connection in the flow.- Specified by:
getDatabaseConnection
in classAbstractSimpleDbSource
- Returns:
- the database connection to use
-
queryDatabase
protected String queryDatabase()
Performs the actual database query.- Specified by:
queryDatabase
in classAbstractSimpleDbSource
- Returns:
- null if everything is fine, otherwise error message
-
-