public class Database extends Object implements Serializable
| Constructor and Description |
|---|
Database() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object that) |
List<Catalog> |
getCatalogs() |
String |
getCatalogVersionProvider()
A custom version number that, if available, will be used to assess whether the
getInputCatalog() from a given catalog will need to be regenerated. |
List<CustomType> |
getCustomTypes() |
List<EnumType> |
getEnumTypes() |
String |
getExcludes()
All elements that are excluded from your schema.
|
List<ForcedType> |
getForcedTypes() |
String |
getIncludes()
All elements that are generated from your schema.
|
String |
getInputCatalog()
The catalog that is used locally as a source for meta information.
|
String |
getInputSchema()
The schema that is used locally as a source for meta information.
|
Integer |
getLogSlowQueriesAfterSeconds()
The number of seconds that are considered "slow" before a query is logged to indicate a bug, 0 for not logging.
|
String |
getName()
The database dialect from jooq-meta.
|
String |
getOrderProvider()
A custom
Comparator that can compare two Definition objects to determine their order. |
String |
getOutputCatalog()
The catalog that is used in generated source code.
|
String |
getOutputSchema()
The schema that is used in generated source code.
|
String |
getOverridePrimaryKeys()
All (UNIQUE) key names that should be used instead of primary keys on
generated
UpdatableRecord. |
List<Property> |
getProperties() |
String |
getRecordTimestampFields()
All table and view columns that are used as "timestamp" fields for optimistic locking.
|
String |
getRecordVersionFields()
All table and view columns that are used as "version" fields for optimistic locking.
|
List<RegexFlag> |
getRegexFlags()
The flags that will be applied to all regular expressions from this configuration by default.
|
List<Schema> |
getSchemata() |
String |
getSchemaVersionProvider()
A custom version number that, if available, will be used to assess whether the
getInputSchema() will need to be regenerated. |
String |
getSyntheticIdentities()
A regular expression matching all columns that represent identities.
|
String |
getSyntheticPrimaryKeys()
A regular expression matching all columns that participate in "synthetic" primary keys,
which should be placed on generated
UpdatableRecord
To be used with:
org.jooq.UpdatableRecord.store()
org.jooq.UpdatableRecord.update()
org.jooq.UpdatableRecord.delete()
org.jooq.UpdatableRecord.refresh()
Synthetic primary keys will override existing primary keys. |
int |
hashCode() |
Boolean |
isDateAsTimestamp()
Generate
Timestamp fields for DATE columns. |
Boolean |
isForceIntegerTypesOnZeroScaleDecimals()
Historically, zero-scale decimal types are generated as their most appropriate, corresponding integer type (e.g.
|
Boolean |
isIgnoreProcedureReturnValues()
Deprecated.
This feature is deprecated as of jOOQ 3.6.0 and will be removed again in
jOOQ 4.0.
|
Boolean |
isIncludeExcludeColumns()
This flag indicates whether include / exclude patterns should also match columns within tables.
|
Boolean |
isIncludeForeignKeys()
This flag indicates whether foreign keys should be included in output produced by this database
|
Boolean |
isIncludeIndexes()
This flag indicates whether indexes should be included in output produced by this database
|
Boolean |
isIncludePackageConstants()
This flag indicates whether constants contained in packages should be included in output produced by this database
|
Boolean |
isIncludePackageRoutines()
This flag indicates whether routines contained in packages should be included in output produced by this database
|
Boolean |
isIncludePackages()
This flag indicates whether packages should be included in output produced by this database
|
Boolean |
isIncludePackageUDTs()
This flag indicates whether UDTs contained in packages should be included in output produced by this database
|
Boolean |
isIncludePrimaryKeys()
This flag indicates whether primary keys should be included in output produced by this database
|
Boolean |
isIncludeRoutines()
This flag indicates whether routines should be included in output produced by this database
|
Boolean |
isIncludeSequences()
This flag indicates whether sequences should be included in output produced by this database
|
Boolean |
isIncludeTables()
This flag indicates whether tables should be included in output produced by this database
|
Boolean |
isIncludeTriggerRoutines()
This flag indicates whether trigger implementation routines should be included in output produced by this database (e.g. in PostgreSQL)
|
Boolean |
isIncludeUDTs()
This flag indicates whether udts should be included in output produced by this database
|
Boolean |
isIncludeUniqueKeys()
This flag indicates whether unique keys should be included in output produced by this database
|
Boolean |
isOutputCatalogToDefault()
A flag to indicate that the outputCatalog should be the "default" catalog,
which generates catalog-less, unqualified tables, procedures, etc.
|
Boolean |
isOutputSchemaToDefault()
A flag to indicate that the outputSchema should be the "default" schema,
which generates schema-less, unqualified tables, procedures, etc.
|
Boolean |
isTableValuedFunctions()
Whether table valued functions should be reported as tables.
|
Boolean |
isUnsignedTypes()
Generate jOOU data types for your unsigned data types, which are not natively supported in Java
|
void |
setCatalogs(List<Catalog> catalogs) |
void |
setCatalogVersionProvider(String value)
Sets the value of the catalogVersionProvider property.
|
void |
setCustomTypes(List<CustomType> customTypes) |
void |
setDateAsTimestamp(Boolean value)
Sets the value of the dateAsTimestamp property.
|
void |
setEnumTypes(List<EnumType> enumTypes) |
void |
setExcludes(String value)
Sets the value of the excludes property.
|
void |
setForcedTypes(List<ForcedType> forcedTypes) |
void |
setForceIntegerTypesOnZeroScaleDecimals(Boolean value)
Sets the value of the forceIntegerTypesOnZeroScaleDecimals property.
|
void |
setIgnoreProcedureReturnValues(Boolean value)
Sets the value of the ignoreProcedureReturnValues property.
|
void |
setIncludeExcludeColumns(Boolean value)
Sets the value of the includeExcludeColumns property.
|
void |
setIncludeForeignKeys(Boolean value)
Sets the value of the includeForeignKeys property.
|
void |
setIncludeIndexes(Boolean value)
Sets the value of the includeIndexes property.
|
void |
setIncludePackageConstants(Boolean value)
Sets the value of the includePackageConstants property.
|
void |
setIncludePackageRoutines(Boolean value)
Sets the value of the includePackageRoutines property.
|
void |
setIncludePackages(Boolean value)
Sets the value of the includePackages property.
|
void |
setIncludePackageUDTs(Boolean value)
Sets the value of the includePackageUDTs property.
|
void |
setIncludePrimaryKeys(Boolean value)
Sets the value of the includePrimaryKeys property.
|
void |
setIncludeRoutines(Boolean value)
Sets the value of the includeRoutines property.
|
void |
setIncludes(String value)
Sets the value of the includes property.
|
void |
setIncludeSequences(Boolean value)
Sets the value of the includeSequences property.
|
void |
setIncludeTables(Boolean value)
Sets the value of the includeTables property.
|
void |
setIncludeTriggerRoutines(Boolean value)
Sets the value of the includeTriggerRoutines property.
|
void |
setIncludeUDTs(Boolean value)
Sets the value of the includeUDTs property.
|
void |
setIncludeUniqueKeys(Boolean value)
Sets the value of the includeUniqueKeys property.
|
void |
setInputCatalog(String value)
Sets the value of the inputCatalog property.
|
void |
setInputSchema(String value)
Sets the value of the inputSchema property.
|
void |
setLogSlowQueriesAfterSeconds(Integer value)
Sets the value of the logSlowQueriesAfterSeconds property.
|
void |
setName(String value)
Sets the value of the name property.
|
void |
setOrderProvider(String value)
Sets the value of the orderProvider property.
|
void |
setOutputCatalog(String value)
Sets the value of the outputCatalog property.
|
void |
setOutputCatalogToDefault(Boolean value)
Sets the value of the outputCatalogToDefault property.
|
void |
setOutputSchema(String value)
Sets the value of the outputSchema property.
|
void |
setOutputSchemaToDefault(Boolean value)
Sets the value of the outputSchemaToDefault property.
|
void |
setOverridePrimaryKeys(String value)
Sets the value of the overridePrimaryKeys property.
|
void |
setProperties(List<Property> properties) |
void |
setRecordTimestampFields(String value)
Sets the value of the recordTimestampFields property.
|
void |
setRecordVersionFields(String value)
Sets the value of the recordVersionFields property.
|
void |
setSchemata(List<Schema> schemata) |
void |
setSchemaVersionProvider(String value)
Sets the value of the schemaVersionProvider property.
|
void |
setSyntheticIdentities(String value)
Sets the value of the syntheticIdentities property.
|
void |
setSyntheticPrimaryKeys(String value)
Sets the value of the syntheticPrimaryKeys property.
|
void |
setTableValuedFunctions(Boolean value)
Sets the value of the tableValuedFunctions property.
|
void |
setUnsignedTypes(Boolean value)
Sets the value of the unsignedTypes property.
|
String |
toString() |
Database |
withCatalogs(Catalog... values) |
Database |
withCatalogs(Collection<Catalog> values) |
Database |
withCatalogs(List<Catalog> catalogs) |
Database |
withCatalogVersionProvider(String value) |
Database |
withCustomTypes(Collection<CustomType> values) |
Database |
withCustomTypes(CustomType... values) |
Database |
withCustomTypes(List<CustomType> customTypes) |
Database |
withDateAsTimestamp(Boolean value) |
Database |
withEnumTypes(Collection<EnumType> values) |
Database |
withEnumTypes(EnumType... values) |
Database |
withEnumTypes(List<EnumType> enumTypes) |
Database |
withExcludes(String value) |
Database |
withForcedTypes(Collection<ForcedType> values) |
Database |
withForcedTypes(ForcedType... values) |
Database |
withForcedTypes(List<ForcedType> forcedTypes) |
Database |
withForceIntegerTypesOnZeroScaleDecimals(Boolean value) |
Database |
withIgnoreProcedureReturnValues(Boolean value) |
Database |
withIncludeExcludeColumns(Boolean value) |
Database |
withIncludeForeignKeys(Boolean value) |
Database |
withIncludeIndexes(Boolean value) |
Database |
withIncludePackageConstants(Boolean value) |
Database |
withIncludePackageRoutines(Boolean value) |
Database |
withIncludePackages(Boolean value) |
Database |
withIncludePackageUDTs(Boolean value) |
Database |
withIncludePrimaryKeys(Boolean value) |
Database |
withIncludeRoutines(Boolean value) |
Database |
withIncludes(String value) |
Database |
withIncludeSequences(Boolean value) |
Database |
withIncludeTables(Boolean value) |
Database |
withIncludeTriggerRoutines(Boolean value) |
Database |
withIncludeUDTs(Boolean value) |
Database |
withIncludeUniqueKeys(Boolean value) |
Database |
withInputCatalog(String value) |
Database |
withInputSchema(String value) |
Database |
withLogSlowQueriesAfterSeconds(Integer value) |
Database |
withName(String value) |
Database |
withOrderProvider(String value) |
Database |
withOutputCatalog(String value) |
Database |
withOutputCatalogToDefault(Boolean value) |
Database |
withOutputSchema(String value) |
Database |
withOutputSchemaToDefault(Boolean value) |
Database |
withOverridePrimaryKeys(String value) |
Database |
withProperties(Collection<Property> values) |
Database |
withProperties(List<Property> properties) |
Database |
withProperties(Property... values) |
Database |
withRecordTimestampFields(String value) |
Database |
withRecordVersionFields(String value) |
Database |
withRegexFlags(Collection<RegexFlag> values) |
Database |
withRegexFlags(RegexFlag... values) |
Database |
withSchemata(Collection<Schema> values) |
Database |
withSchemata(List<Schema> schemata) |
Database |
withSchemata(Schema... values) |
Database |
withSchemaVersionProvider(String value) |
Database |
withSyntheticIdentities(String value) |
Database |
withSyntheticPrimaryKeys(String value) |
Database |
withTableValuedFunctions(Boolean value) |
Database |
withUnsignedTypes(Boolean value) |
protected String name
protected String includes
protected String excludes
protected Boolean includeExcludeColumns
protected Boolean includeTables
protected Boolean includeRoutines
protected Boolean includeTriggerRoutines
protected Boolean includePackages
protected Boolean includePackageRoutines
protected Boolean includePackageUDTs
protected Boolean includePackageConstants
protected Boolean includeUDTs
protected Boolean includeSequences
protected Boolean includeIndexes
protected Boolean includePrimaryKeys
protected Boolean includeUniqueKeys
protected Boolean includeForeignKeys
protected String recordVersionFields
protected String recordTimestampFields
protected String syntheticIdentities
protected String syntheticPrimaryKeys
protected String overridePrimaryKeys
protected Boolean dateAsTimestamp
protected Boolean ignoreProcedureReturnValues
protected Boolean unsignedTypes
protected String inputCatalog
protected String outputCatalog
protected Boolean outputCatalogToDefault
protected String inputSchema
protected String outputSchema
protected Boolean outputSchemaToDefault
protected String schemaVersionProvider
protected String catalogVersionProvider
protected String orderProvider
protected Boolean forceIntegerTypesOnZeroScaleDecimals
protected Boolean tableValuedFunctions
protected Integer logSlowQueriesAfterSeconds
protected List<CustomType> customTypes
protected List<ForcedType> forcedTypes
public String getName()
org.util.[database].[database]Database.
Natively supported values are:
meta.ase.ASEDatabaseCUBRIDDatabasemeta.db2.DB2DatabaseDerbyDatabaseFirebirdDatabaseH2Databasemeta.hana.HanaDatabaseHSQLDBDatabasemeta.informix.InformixDatabasemeta.ingres.IngresDatabaseMariaDBDatabaseMySQLDatabasemeta.oracle.OracleDatabasePostgresDatabasemeta.redshift.RedshiftDatabaseSQLiteDatabasemeta.sqlserver.SQLServerDatabasemeta.sybase.SybaseDatabasemeta.vertica.VerticaDatabaseThis value can be used to reverse-engineer generic JDBC DatabaseMetaData (e.g. for MS Access).
This value can be used to reverse-engineer standard jOOQ-meta XML formats.
This value can be used to reverse-engineer JPA annotated entities
You can also provide your own org.jooq.meta.Database implementation here, if your database is currently not supported
Stringpublic void setName(String value)
value - allowed object is
Stringpublic List<RegexFlag> getRegexFlags()
The default value is "COMMENTS CASE_INSENSITIVE"Gets the value of the regexFlags property.
This accessor method returns a reference to the live list,
not a snapshot. Therefore any modification you make to the
returned list will be present inside the JAXB object.
This is why there is not a set method for the regexFlags property.
For example, to add a new item, do as follows:
getRegexFlags().add(newItem);
Objects of the following type(s) are allowed in the list
RegexFlag
public String getIncludes()
This is a Java regular expression. Use the pipe to separate several expressions. Watch out for case-sensitivity. Depending on your database, this might be important!
You can create case-insensitive regular expressions
using this syntax: (?i:expr)
Whitespace is ignored and comments are possible unless overridden in getRegexFlags().
Stringpublic void setIncludes(String value)
value - allowed object is
Stringpublic String getExcludes()
This is a Java regular expression. Use the pipe to separate several expressions. Excludes match before includes, i.e. excludes have a higher priority.
Stringpublic void setExcludes(String value)
value - allowed object is
Stringpublic Boolean isIncludeExcludeColumns()
Booleanpublic void setIncludeExcludeColumns(Boolean value)
value - allowed object is
Booleanpublic Boolean isIncludeTables()
Booleanpublic void setIncludeTables(Boolean value)
value - allowed object is
Booleanpublic Boolean isIncludeRoutines()
Booleanpublic void setIncludeRoutines(Boolean value)
value - allowed object is
Booleanpublic Boolean isIncludeTriggerRoutines()
Booleanpublic void setIncludeTriggerRoutines(Boolean value)
value - allowed object is
Booleanpublic Boolean isIncludePackages()
Booleanpublic void setIncludePackages(Boolean value)
value - allowed object is
Booleanpublic Boolean isIncludePackageRoutines()
Booleanpublic void setIncludePackageRoutines(Boolean value)
value - allowed object is
Booleanpublic Boolean isIncludePackageUDTs()
Booleanpublic void setIncludePackageUDTs(Boolean value)
value - allowed object is
Booleanpublic Boolean isIncludePackageConstants()
Booleanpublic void setIncludePackageConstants(Boolean value)
value - allowed object is
Booleanpublic Boolean isIncludeUDTs()
Booleanpublic void setIncludeUDTs(Boolean value)
value - allowed object is
Booleanpublic Boolean isIncludeSequences()
Booleanpublic void setIncludeSequences(Boolean value)
value - allowed object is
Booleanpublic Boolean isIncludeIndexes()
Booleanpublic void setIncludeIndexes(Boolean value)
value - allowed object is
Booleanpublic Boolean isIncludePrimaryKeys()
Booleanpublic void setIncludePrimaryKeys(Boolean value)
value - allowed object is
Booleanpublic Boolean isIncludeUniqueKeys()
Booleanpublic void setIncludeUniqueKeys(Boolean value)
value - allowed object is
Booleanpublic Boolean isIncludeForeignKeys()
Booleanpublic void setIncludeForeignKeys(Boolean value)
value - allowed object is
Booleanpublic String getRecordVersionFields()
This is a Java regular expression. Use the pipe to separate several expressions.
See org.jooq.UpdatableRecord.store() and org.jooq.UpdatableRecord.delete() for details about optimistic locking.
Stringpublic void setRecordVersionFields(String value)
value - allowed object is
Stringpublic String getRecordTimestampFields()
This is a Java regular expression. Use the pipe to separate several expressions.
See org.jooq.UpdatableRecord.store() and org.jooq.UpdatableRecord.delete() for details about optimistic locking.
Stringpublic void setRecordTimestampFields(String value)
value - allowed object is
Stringpublic String getSyntheticIdentities()
To be used if columns are not detected as automatically as identities.
Stringpublic void setSyntheticIdentities(String value)
value - allowed object is
Stringpublic String getSyntheticPrimaryKeys()
UpdatableRecord
To be used with:
org.jooq.UpdatableRecord.store()org.jooq.UpdatableRecord.update()org.jooq.UpdatableRecord.delete()org.jooq.UpdatableRecord.refresh()Synthetic primary keys will override existing primary keys.
Stringpublic void setSyntheticPrimaryKeys(String value)
value - allowed object is
Stringpublic String getOverridePrimaryKeys()
UpdatableRecord.
To be used with:
org.jooq.UpdatableRecord.store()org.jooq.UpdatableRecord.update()org.jooq.UpdatableRecord.delete()org.jooq.UpdatableRecord.refresh()If several keys match, a warning is emitted and the first one encountered will be used.
This flag will also replace synthetic primary keys, if it matches.
Stringpublic void setOverridePrimaryKeys(String value)
value - allowed object is
Stringpublic Boolean isDateAsTimestamp()
Timestamp fields for DATE columns. This is particularly useful for Oracle databasesBooleanpublic void setDateAsTimestamp(Boolean value)
value - allowed object is
Booleanpublic Boolean isIgnoreProcedureReturnValues()
In jOOQ 3.6.0, #4106 was implemented to support Transact-SQL's
optional return values from stored procedures. This turns all procedures
into Routine
Booleanpublic void setIgnoreProcedureReturnValues(Boolean value)
value - allowed object is
Booleanpublic Boolean isUnsignedTypes()
Booleanpublic void setUnsignedTypes(Boolean value)
value - allowed object is
Booleanpublic String getInputCatalog()
This cannot be combined with the getCatalogs() configuration element.
If left empty (and without any getCatalogs() configuration element), jOOQ will generate all available catalogs.
Stringpublic void setInputCatalog(String value)
value - allowed object is
Stringpublic String getOutputCatalog()
Use this to override your local development
catalog name for source code generation. If not specified, this
will be the same as getInputCatalog()
This will be ignored if isOutputCatalogToDefault() is set to true
Stringpublic void setOutputCatalog(String value)
value - allowed object is
Stringpublic Boolean isOutputCatalogToDefault()
Booleanpublic void setOutputCatalogToDefault(Boolean value)
value - allowed object is
Booleanpublic String getInputSchema()
This cannot be combined with the getSchemata() configuration element.
If left empty (and without any getSchemata() configuration element), jOOQ will generate all available schemata.
Stringpublic void setInputSchema(String value)
value - allowed object is
Stringpublic String getOutputSchema()
Use this to override your local development
schema name for source code generation. If not specified, this
will be the same as getInputSchema().
This will be ignored if isOutputSchemaToDefault() is set to true
Stringpublic void setOutputSchema(String value)
value - allowed object is
Stringpublic Boolean isOutputSchemaToDefault()
Booleanpublic void setOutputSchemaToDefault(Boolean value)
value - allowed object is
Booleanpublic String getSchemaVersionProvider()
getInputSchema() will need to be regenerated.
There are three operation modes for this element:
SchemaVersionProvider. Such classes must provide a default constructor
Schema versions will be generated into the Generated annotation on
generated artefacts.
Stringpublic void setSchemaVersionProvider(String value)
value - allowed object is
Stringpublic String getCatalogVersionProvider()
getInputCatalog() from a given catalog will need to be regenerated.
There are three operation modes for this element:
CatalogVersionProvider. Such classes must provide a default constructor
Catalog versions will be generated into the Generated annotation on
generated artefacts.
Stringpublic void setCatalogVersionProvider(String value)
value - allowed object is
Stringpublic String getOrderProvider()
Comparator that can compare two Definition objects to determine their order.
This comparator can be used to influence the order of any object that is produced by jOOQ meta, and thus, indirectly, the order of declared objects in generated code.
Stringpublic void setOrderProvider(String value)
value - allowed object is
Stringpublic Boolean isForceIntegerTypesOnZeroScaleDecimals()
getForcedTypes(), the latter will win.Booleanpublic void setForceIntegerTypesOnZeroScaleDecimals(Boolean value)
value - allowed object is
Booleanpublic Boolean isTableValuedFunctions()
If this is deactivated, such functions are not generated as tables, but as ordinary routines. This is particularly useful for backwards- compatibility between jOOQ 3.8 and previous versions, when using TABLE and VARRAY types in Oracle.
While this flag defaults to true for most databases, it defaults to false for Oracle.
Booleanpublic void setTableValuedFunctions(Boolean value)
value - allowed object is
Booleanpublic Integer getLogSlowQueriesAfterSeconds()
Integerpublic void setLogSlowQueriesAfterSeconds(Integer value)
value - allowed object is
Integerpublic List<CustomType> getCustomTypes()
public void setCustomTypes(List<CustomType> customTypes)
public List<ForcedType> getForcedTypes()
public void setForcedTypes(List<ForcedType> forcedTypes)
public Database withRegexFlags(Collection<RegexFlag> values)
public Database withForceIntegerTypesOnZeroScaleDecimals(Boolean value)
public Database withProperties(Collection<Property> values)
public Database withCatalogs(Collection<Catalog> values)
public Database withSchemata(Collection<Schema> values)
public Database withCustomTypes(CustomType... values)
public Database withCustomTypes(Collection<CustomType> values)
public Database withCustomTypes(List<CustomType> customTypes)
public Database withEnumTypes(Collection<EnumType> values)
public Database withForcedTypes(ForcedType... values)
public Database withForcedTypes(Collection<ForcedType> values)
public Database withForcedTypes(List<ForcedType> forcedTypes)
Copyright © 2019. All rights reserved.