Package adams.flow.standalone
Class DatabaseConnection
-
- All Implemented Interfaces:
AdditionalInformationHandler
,CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,PasswordPrompter
,PasswordSupporter
,QuickInfoSupporter
,ShallowCopySupporter<Actor>
,SizeOfHandler
,Stoppable
,StoppableWithFeedback
,VariablesInspectionHandler
,VariableChangeListener
,Actor
,ErrorHandler
,InteractiveActor
,OptionalPasswordPrompt
,StopModeSupporter
,AbstractDatabaseConnectionProvider
,DatabaseConnectionProvider
,Serializable
,Comparable
public class DatabaseConnection extends AbstractDatabaseConnection implements DatabaseConnectionProvider
For initializing an ADAMS database connection that differs from the system-wide one.
Valid options are:
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-name <java.lang.String> (property: name) The name of the actor. default: DatabaseConnection
-annotation <adams.core.base.BaseText> (property: annotations) The annotations to attach to this actor. default:
-skip (property: skip) If set to true, transformation is skipped and the input token is just forwarded as it is.
-stop-flow-on-error (property: stopFlowOnError) If set to true, the flow gets stopped in case this actor encounters an error; useful for critical actors.
-url <java.lang.String> (property: URL) The JDBC URL of the database to connect to, can contain variables or file placeholders.
-user <java.lang.String> (property: user) The database user to connect with.
-password <adams.core.base.BasePassword> (property: password) The password of the database user.
-prompt-for-password (property: promptForPassword) If enabled and authentication is required, the user gets prompted for enter a password if none has been provided in the setup.
-stop-if-canceled (property: stopFlowIfCanceled) If enabled, the flow gets stopped in case the user cancels the dialog.
-custom-stop-message <java.lang.String> (property: customStopMessage) The custom stop message to use in case a user cancelation stops the flow (default is the full name of the actor) default:
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.flow.standalone.AbstractDatabaseConnection
m_ActualPassword, m_CloseConnection, m_Connection, m_CustomStopMessage, m_DataTypeSetup, m_Password, m_PromptForPassword, m_StopFlowIfCanceled, m_StopMode, m_URL, m_User
-
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
-
Fields inherited from interface adams.flow.core.InteractiveActor
INTERACTION_CANCELED
-
-
Constructor Summary
Constructors Constructor Description DatabaseConnection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
globalInfo()
Returns a string describing the object.protected AbstractDatabaseConnection
retrieveConnection()
Returns the database connection in use.-
Methods inherited from class adams.flow.standalone.AbstractDatabaseConnection
closeConnectionTipText, customStopMessageTipText, dataTypeSetupTipText, defineOptions, doExecute, doInteract, doInteractHeadless, getCloseConnection, getConnection, getCustomStopMessage, getDataTypeSetup, getPassword, getPromptForPassword, getQuickInfo, getResolvedURL, getStopFlowIfCanceled, getStopMode, getURL, getUser, passwordTipText, promptForPasswordTipText, setCloseConnection, setCustomStopMessage, setDataTypeSetup, setPassword, setPromptForPassword, setStopFlowIfCanceled, setStopMode, setURL, setUser, stopFlowIfCanceledTipText, stopModeTipText, supportsHeadlessInteraction, URLTipText, userTipText, wrapUp
-
Methods inherited from class adams.flow.standalone.AbstractStandalone
preExecute
-
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, initialize, isBackedUp, isExecuted, isExecuting, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, performVariableChecks, postExecute, pruneBackup, pruneBackup, reset, 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.standalone.AbstractDatabaseConnectionProvider
getConnection
-
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, getQuickInfo, 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, wrapUp
-
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, defineOptions, getOptionManager
-
Methods inherited from interface adams.core.VariablesInspectionHandler
canInspectOptions
-
-
-
-
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
-
retrieveConnection
protected AbstractDatabaseConnection retrieveConnection()
Returns the database connection in use. Reconnects the database, to make sure that the database connection is the correct one.- Specified by:
retrieveConnection
in classAbstractDatabaseConnection
- Returns:
- the connection object
-
-