Package adams.data.jooq
Class BasicConfigurationGenerator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.jooq.AbstractJOOQConfigurationGenerator
-
- adams.data.jooq.BasicConfigurationGenerator
-
- 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
public class BasicConfigurationGenerator extends AbstractJOOQConfigurationGenerator
Basic generator.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-output <adams.core.io.PlaceholderFile> (property: output) The file to store the XML configuration in. default: ${CWD}
-provider <adams.data.jooq.AbstractJOOQCodeGeneratorProvider> (property: provider) The provider for the jOOQ code generator to use. default: adams.data.jooq.JavaCodeGeneratorProvider
-dialect <SQL99|CUBRID|DERBY|FIREBIRD|H2|HSQLDB|MARIADB|MYSQL|POSTGRES|SQLITE> (property: dialect) The SQL dialect to use. default: MYSQL
-schema <java.lang.String> (property: schema) The database schema to use. default: somedatabase
-include <adams.core.base.BaseRegExp> [-include ...] (property: includes) The regular expressions to use for including tables of the schema. default: .*
-exclude <adams.core.base.BaseRegExp> [-exclude ...] (property: excludes) The regular expressions to use for excluding tables of the schema. default:
-package-name <java.lang.String> (property: packageName) The Java package name to use. default: adams.db.database
-output-dir <adams.core.io.PlaceholderDirectory> (property: outputDir) The directory to store the generated code in. default: ${TMP}
- 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 org.jooq.SQLDialect
m_Dialect
the SQL dialect.protected adams.core.base.BaseRegExp[]
m_Excludes
the excludes.protected adams.core.base.BaseRegExp[]
m_Includes
the includes.protected adams.core.io.PlaceholderDirectory
m_OutputDir
the output directory.protected String
m_PackageName
the package name.protected String
m_Schema
the schema.-
Fields inherited from class adams.data.jooq.AbstractJOOQConfigurationGenerator
m_DatabaseConnection, m_Output, m_Provider
-
-
Constructor Summary
Constructors Constructor Description BasicConfigurationGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.String
dialectTipText()
Returns the tip text for this property.protected String
doGenerate()
Performs the actual generation.String
excludesTipText()
Returns the tip text for this property.org.jooq.SQLDialect
getDialect()
Returns the SQL dialect to use.adams.core.base.BaseRegExp[]
getExcludes()
Returns the regular expressions for excluding tables from the schema.adams.core.base.BaseRegExp[]
getIncludes()
Returns the regular expressions for including tables from the schema.adams.core.io.PlaceholderDirectory
getOutputDir()
Returns the directory to store the code in.String
getPackageName()
Returns the package name to use.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.String
getSchema()
Returns the schema to use.String
globalInfo()
Returns a string describing the object.String
includesTipText()
Returns the tip text for this property.String
outputDirTipText()
Returns the tip text for this property.String
packageNameTipText()
Returns the tip text for this property.String
schemaTipText()
Returns the tip text for this property.void
setDialect(org.jooq.SQLDialect value)
Sets the SQL dialect to use.void
setExcludes(adams.core.base.BaseRegExp[] value)
Sets the regular expressions for excluding tables from the schema.void
setIncludes(adams.core.base.BaseRegExp[] value)
Sets the regular expressions for including tables from the schema.void
setOutputDir(adams.core.io.PlaceholderDirectory value)
Sets the directory to store the code in.void
setPackageName(String value)
Sets the package name to use.void
setSchema(String value)
Sets the schema to use.-
Methods inherited from class adams.data.jooq.AbstractJOOQConfigurationGenerator
check, generate, getDatabaseConnection, getOutput, getProvider, initialize, outputTipText, providerTipText, setDatabaseConnection, setOutput, setProvider
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Dialect
protected org.jooq.SQLDialect m_Dialect
the SQL dialect.
-
m_Schema
protected String m_Schema
the schema.
-
m_Includes
protected adams.core.base.BaseRegExp[] m_Includes
the includes.
-
m_Excludes
protected adams.core.base.BaseRegExp[] m_Excludes
the excludes.
-
m_PackageName
protected String m_PackageName
the package name.
-
m_OutputDir
protected adams.core.io.PlaceholderDirectory m_OutputDir
the output directory.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classadams.core.option.AbstractOptionHandler
- 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 interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classAbstractJOOQConfigurationGenerator
-
setDialect
public void setDialect(org.jooq.SQLDialect value)
Sets the SQL dialect to use.- Parameters:
value
- the dialect
-
getDialect
public org.jooq.SQLDialect getDialect()
Returns the SQL dialect to use.- Returns:
- the dialect
-
dialectTipText
public String dialectTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSchema
public void setSchema(String value)
Sets the schema to use.- Parameters:
value
- the schema
-
getSchema
public String getSchema()
Returns the schema to use.- Returns:
- the schema
-
schemaTipText
public String schemaTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setIncludes
public void setIncludes(adams.core.base.BaseRegExp[] value)
Sets the regular expressions for including tables from the schema.- Parameters:
value
- the includes
-
getIncludes
public adams.core.base.BaseRegExp[] getIncludes()
Returns the regular expressions for including tables from the schema.- Returns:
- the includes
-
includesTipText
public String includesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setExcludes
public void setExcludes(adams.core.base.BaseRegExp[] value)
Sets the regular expressions for excluding tables from the schema.- Parameters:
value
- the excludes
-
getExcludes
public adams.core.base.BaseRegExp[] getExcludes()
Returns the regular expressions for excluding tables from the schema.- Returns:
- the excludes
-
excludesTipText
public String excludesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPackageName
public void setPackageName(String value)
Sets the package name to use.- Parameters:
value
- the package name
-
getPackageName
public String getPackageName()
Returns the package name to use.- Returns:
- the package name
-
packageNameTipText
public String packageNameTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOutputDir
public void setOutputDir(adams.core.io.PlaceholderDirectory value)
Sets the directory to store the code in.- Parameters:
value
- the output dir
-
getOutputDir
public adams.core.io.PlaceholderDirectory getOutputDir()
Returns the directory to store the code in.- Returns:
- the output dir
-
outputDirTipText
public String outputDirTipText()
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
- Overrides:
getQuickInfo
in classAbstractJOOQConfigurationGenerator
- Returns:
- null if no info available, otherwise short string
-
doGenerate
protected String doGenerate() throws Exception
Performs the actual generation.- Specified by:
doGenerate
in classAbstractJOOQConfigurationGenerator
- Returns:
- the XML content, null if failed to generate
- Throws:
Exception
- if an error occurs
-
-