Package adams.data.jooq
Class AbstractJOOQConfigurationGenerator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.jooq.AbstractJOOQConfigurationGenerator
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.QuickInfoSupporter
,adams.core.SizeOfHandler
,adams.db.DatabaseConnectionHandler
,adams.db.DatabaseConnectionProvider
,adams.db.DatabaseConnectionUser
,Serializable
- Direct Known Subclasses:
AbstractJOOQConfigurationGeneratorScript
,AbstractScriptedJOOQConfigurationGenerator
,BasicConfigurationGenerator
public abstract class AbstractJOOQConfigurationGenerator extends adams.core.option.AbstractOptionHandler implements adams.db.DatabaseConnectionHandler, adams.core.QuickInfoSupporter
Ancestor for jOOQ XML configuration file generators.- Version:
- $Revision: 8697 $
- 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 connection to use.protected adams.core.io.PlaceholderFile
m_Output
the XML file to generate.protected AbstractJOOQCodeGeneratorProvider
m_Provider
the provider for the code generator to use.
-
Constructor Summary
Constructors Constructor Description AbstractJOOQConfigurationGenerator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
check()
Hook method for performing checks.void
defineOptions()
Adds options to the internal list of options.protected abstract String
doGenerate()
Performs the actual generation.adams.core.io.PlaceholderFile
generate()
Generates the XML configuration.adams.db.AbstractDatabaseConnection
getDatabaseConnection()
Returns the currently used database connection object, can be null.adams.core.io.PlaceholderFile
getOutput()
Returns the file to store the XML configuration in.AbstractJOOQCodeGeneratorProvider
getProvider()
Returns the provider for the code generator to use.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.protected void
initialize()
Initializes the members.String
outputTipText()
Returns the tip text for this property.String
providerTipText()
Returns the tip text for this property.void
setDatabaseConnection(adams.db.AbstractDatabaseConnection value)
Sets the database connection object to use.void
setOutput(adams.core.io.PlaceholderFile value)
Sets the file to store the XML configuration in.void
setProvider(AbstractJOOQCodeGeneratorProvider value)
Sets the provider for the code generator to use.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Output
protected adams.core.io.PlaceholderFile m_Output
the XML file to generate.
-
m_Provider
protected AbstractJOOQCodeGeneratorProvider m_Provider
the provider for the code generator to use.
-
m_DatabaseConnection
protected adams.db.AbstractDatabaseConnection m_DatabaseConnection
the connection to use.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classadams.core.option.AbstractOptionHandler
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classadams.core.option.AbstractOptionHandler
-
setOutput
public void setOutput(adams.core.io.PlaceholderFile value)
Sets the file to store the XML configuration in.- Parameters:
value
- the output file
-
getOutput
public adams.core.io.PlaceholderFile getOutput()
Returns the file to store the XML configuration in.- Returns:
- the output file
-
outputTipText
public String outputTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setProvider
public void setProvider(AbstractJOOQCodeGeneratorProvider value)
Sets the provider for the code generator to use.- Parameters:
value
- the provider
-
getProvider
public AbstractJOOQCodeGeneratorProvider getProvider()
Returns the provider for the code generator to use.- Returns:
- the provider
-
providerTipText
public String providerTipText()
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 interfaceadams.core.QuickInfoSupporter
- Returns:
- null if no info available, otherwise short string
-
check
protected void check()
Hook method for performing checks.
-
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
-
doGenerate
protected abstract String doGenerate() throws Exception
Performs the actual generation.- Returns:
- the XML content, null if failed to generate
- Throws:
Exception
- if an error occurs
-
generate
public adams.core.io.PlaceholderFile generate()
Generates the XML configuration.- Returns:
- the generated XML file or null in case of an error
-
-