Package adams.core.option
Class DatabaseActorExecutionClassProducer
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.option.AbstractOptionProducer<O,I>
-
- adams.core.option.AbstractRecursiveOptionProducer<O,I>
-
- adams.core.option.AbstractRecursiveOptionProducerWithOptionHandling<String,String>
-
- adams.core.option.AbstractJavaCodeProducer
-
- adams.core.option.AbstractActorJavaCodeProducer
-
- adams.core.option.ActorExecutionClassProducer
-
- adams.core.option.DatabaseActorExecutionClassProducer
-
- All Implemented Interfaces:
CleanUpHandler,Destroyable,FileFormatHandler,LoggingSupporter,OptionHandler,OptionProducer<String,String>,OptionProducerWithOptionHandling<String,String>,RecursiveOptionProducer,PasswordSupporter,SizeOfHandler,Serializable
public class DatabaseActorExecutionClassProducer extends ActorExecutionClassProducer implements PasswordSupporter
Generates a wrapper for an actor that works in conjunction with a database.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BasePasswordm_Passwordthe database password.protected Stringm_URLthe database URL.protected Stringm_Userthe database user.-
Fields inherited from class adams.core.option.AbstractJavaCodeProducer
JAVA_KEYWORDS, m_AdditionalImportsInsertLocation, m_Copyright, m_Indentation, m_JavaKeywords, m_OutputBuffer, m_OutputDefaultValues, m_Package, m_ShortenedImports, m_SimpleName, m_VarNames
-
Fields inherited from class adams.core.option.AbstractRecursiveOptionProducerWithOptionHandling
m_OptionManager
-
Fields inherited from class adams.core.option.AbstractRecursiveOptionProducer
m_Nesting
-
Fields inherited from class adams.core.option.AbstractOptionProducer
m_Input, m_LastGenerated, m_Output, m_OutputVariableValues, m_SkippedProperties, m_UsePropertyNames
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description DatabaseActorExecutionClassProducer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddPreExecuteMethod()Adds a method that gets executed just prior to the actors setup and execution.BasePasswordgetPassword()Returns the database URL.protected List<String>getRequiredImports()Returns other necessary imports.StringgetURL()Returns the database URL.StringgetUser()Returns the database user.StringglobalInfo()Returns a string describing the object.protected voidinitialize()Initializes the visitor.static voidmain(String[] args)Executes the producer from commandline.StringpasswordTipText()Returns the tip text for this property.voidsetPassword(BasePassword value)Sets the database password.voidsetURL(String value)Sets the database URL.voidsetUser(String value)Sets the database user.StringURLTipText()Returns the tip text for this property.StringuserTipText()Returns the tip text for this property.-
Methods inherited from class adams.core.option.ActorExecutionClassProducer
addAdditionalMethods, addClassJavadoc, addDoExecuteMethod, addMainMethod, addMethodEnd, addMethodStart, addPostExecuteMethod, defineOptions, getIndentation, getPackage, getSimpleName, postIndent, preIndent, setPackage, setSimpleName
-
Methods inherited from class adams.core.option.AbstractActorJavaCodeProducer
getDefaultFormatExtension, getFormatDescription, getFormatExtensions, getOuterVariableName, preProduce
-
Methods inherited from class adams.core.option.AbstractJavaCodeProducer
addClassEnd, addClassStart, addConstructor, addCopyright, addImports, addLicensePreamble, addPackage, copyrightTipText, escapeDoubleQuotes, getCast, getClassname, getClassname, getClassname, getCopyright, getCurrentVariable, getNextTmpVariable, getNextTmpVariable, getNextTmpVariable, getOutput, getOutputDefaultValues, initOutput, insertAdditionalImports, isClassName, outputDefaultValuesTipText, packageTipText, postProduce, preProduce, processClassOption, processOption, processOption, processOption, setCopyright, setOutputDefaultValues, shortenClassname, simpleNameTipText, toString
-
Methods inherited from class adams.core.option.AbstractRecursiveOptionProducerWithOptionHandling
cleanUpOptions, destroy, finishInit, getOptionManager, newOptionManager, toCommandLine
-
Methods inherited from class adams.core.option.AbstractRecursiveOptionProducer
cleanUp, generateLoggingString, getDebugIndentation, getDebugIndentation, getRecursionLevel, reset
-
Methods inherited from class adams.core.option.AbstractOptionProducer
checkInput, doProduce, doProduce, getCurrentValue, getInput, getOptionIdentifier, getOutputVariableValues, getSkippedProperties, getUsePropertyNames, isDefaultValue, loggingLevelTipText, outputVariableValuesTipText, postProduce, produce, produce, runProducer, setLoggingLevel, setOutputVariableValues, setSkippedProperties, toString, write
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.option.OptionProducer
cleanUp, doProduce, getInput, getLoggingLevel, getOutputVariableValues, getSkippedProperties, getUsePropertyNames, loggingLevelTipText, outputVariableValuesTipText, produce, setLoggingLevel, setOutputVariableValues, setSkippedProperties, write
-
-
-
-
Field Detail
-
m_URL
protected String m_URL
the database URL.
-
m_User
protected String m_User
the database user.
-
m_Password
protected BasePassword m_Password
the database password.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceOptionProducer<String,String>- Overrides:
globalInfoin classActorExecutionClassProducer- Returns:
- a description suitable for displaying in the gui
-
initialize
protected void initialize()
Initializes the visitor.- Overrides:
initializein classAbstractJavaCodeProducer
-
setURL
public void setURL(String value)
Sets the database URL.- Parameters:
value- the URL
-
getURL
public String getURL()
Returns the database URL.- Returns:
- the URL
-
URLTipText
public String URLTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setUser
public void setUser(String value)
Sets the database user.- Parameters:
value- the user
-
getUser
public String getUser()
Returns the database user.- Returns:
- the user
-
userTipText
public String userTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPassword
public void setPassword(BasePassword value)
Sets the database password.- Specified by:
setPasswordin interfacePasswordSupporter- Parameters:
value- the password
-
getPassword
public BasePassword getPassword()
Returns the database URL.- Specified by:
getPasswordin interfacePasswordSupporter- Returns:
- the URL
-
passwordTipText
public String passwordTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getRequiredImports
protected List<String> getRequiredImports()
Returns other necessary imports.- Overrides:
getRequiredImportsin classActorExecutionClassProducer- Returns:
- the class names
-
addPreExecuteMethod
protected void addPreExecuteMethod()
Adds a method that gets executed just prior to the actors setup and execution.- Overrides:
addPreExecuteMethodin classActorExecutionClassProducer
-
main
public static void main(String[] args)
Executes the producer from commandline.- Parameters:
args- the commandline arguments, use -help for help
-
-