diff --git a/jOOQ-codegen/src/main/java/org/jooq/codegen/GenerationTool.java b/jOOQ-codegen/src/main/java/org/jooq/codegen/GenerationTool.java index f557e215a0..dfbf75bedd 100644 --- a/jOOQ-codegen/src/main/java/org/jooq/codegen/GenerationTool.java +++ b/jOOQ-codegen/src/main/java/org/jooq/codegen/GenerationTool.java @@ -42,6 +42,7 @@ import static java.lang.Boolean.TRUE; import static java.util.Comparator.comparing; import static org.jooq.SQLDialect.HSQLDB; import static org.jooq.impl.DSL.selectOne; +import static org.jooq.tools.StringUtils.defaultIfBlank; import static org.jooq.tools.StringUtils.defaultIfNull; import static org.jooq.tools.StringUtils.defaultString; import static org.jooq.tools.StringUtils.isBlank; @@ -347,6 +348,11 @@ public class GenerationTool { if (a != null) j.setAutoCommit(Boolean.valueOf(a)); } + + if (j.getInitScript() == null) + j.setInitScript(System.getProperty("jooq.codegen.jdbc.initScript")); + if (j.getInitSeparator() == null) + j.setInitSeparator(System.getProperty("jooq.codegen.jdbc.initSeparator")); } if (j != null) { @@ -360,6 +366,11 @@ public class GenerationTool { properties.put("password", defaultString(j.getPassword())); setConnection(driver.newInstance().connect(defaultString(j.getUrl()), properties)); + + if (j.getInitScript() != null) + for (String sql : j.getInitScript().split(defaultIfBlank(j.getInitSeparator(), ";"))) + if (!StringUtils.isBlank(sql)) + ctx.execute(sql); } catch (Exception e) { if (databaseName != null) diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Database.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Database.java index 5697fe801d..131d370627 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Database.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Database.java @@ -19,9 +19,9 @@ import org.jooq.util.jaxb.tools.XMLBuilder; /** * Configuration of the database meta data source. - * - * - * + * + * + * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Database", propOrder = { @@ -233,7 +233,7 @@ public class Database implements Serializable, XMLAppendable *
* You can also provide your own org.jooq.meta.Database implementation * here, if your database is currently not supported - * + * */ public String getName() { return name; @@ -284,7 +284,7 @@ public class Database implements Serializable, XMLAppendable *
* You can also provide your own org.jooq.meta.Database implementation * here, if your database is currently not supported - * + * */ public void setName(String value) { this.name = value; @@ -294,25 +294,25 @@ public class Database implements Serializable, XMLAppendable * The flags that will be applied to all regular expressions from this configuration by default. *
* 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
* {@link RegexFlag }
- *
- *
+ *
+ *
*/
public List
* Whitespace is ignored and comments are possible unless overridden in {@link #getRegexFlags()}.
- *
+ *
*/
public String getIncludes() {
return includes;
@@ -397,7 +397,7 @@ public class Database implements Serializable, XMLAppendable
* using this syntax:
* Whitespace is ignored and comments are possible unless overridden in {@link #getRegexFlags()}.
- *
+ *
*/
public void setIncludes(String value) {
this.includes = value;
@@ -408,7 +408,7 @@ public class Database implements Serializable, XMLAppendable
*
* This is a Java regular expression. Use the pipe to separate several expressions.
* Excludes match before includes, i.e. excludes have a higher priority.
- *
+ *
*/
public String getExcludes() {
return excludes;
@@ -419,7 +419,7 @@ public class Database implements Serializable, XMLAppendable
*
* This is a Java regular expression. Use the pipe to separate several expressions.
* Excludes match before includes, i.e. excludes have a higher priority.
- *
+ *
*/
public void setExcludes(String value) {
this.excludes = value;
@@ -427,11 +427,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether include / exclude patterns should also match columns within tables.
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeExcludeColumns() {
return includeExcludeColumns;
@@ -439,11 +439,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeExcludeColumns property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeExcludeColumns(Boolean value) {
this.includeExcludeColumns = value;
@@ -451,11 +451,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether include / exclude patterns should also match routines within packages.
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeExcludePackageRoutines() {
return includeExcludePackageRoutines;
@@ -463,11 +463,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeExcludePackageRoutines property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeExcludePackageRoutines(Boolean value) {
this.includeExcludePackageRoutines = value;
@@ -475,11 +475,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether tables should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeTables() {
return includeTables;
@@ -487,11 +487,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeTables property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeTables(Boolean value) {
this.includeTables = value;
@@ -499,11 +499,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether embeddable types should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeEmbeddables() {
return includeEmbeddables;
@@ -511,11 +511,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeEmbeddables property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeEmbeddables(Boolean value) {
this.includeEmbeddables = value;
@@ -523,11 +523,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether routines should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeRoutines() {
return includeRoutines;
@@ -535,11 +535,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeRoutines property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeRoutines(Boolean value) {
this.includeRoutines = value;
@@ -547,11 +547,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether trigger implementation routines should be included in output produced by this database (e.g. in PostgreSQL)
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeTriggerRoutines() {
return includeTriggerRoutines;
@@ -559,11 +559,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeTriggerRoutines property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeTriggerRoutines(Boolean value) {
this.includeTriggerRoutines = value;
@@ -571,11 +571,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether packages should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludePackages() {
return includePackages;
@@ -583,11 +583,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includePackages property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludePackages(Boolean value) {
this.includePackages = value;
@@ -595,11 +595,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether routines contained in packages should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludePackageRoutines() {
return includePackageRoutines;
@@ -607,11 +607,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includePackageRoutines property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludePackageRoutines(Boolean value) {
this.includePackageRoutines = value;
@@ -619,11 +619,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether UDTs contained in packages should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludePackageUDTs() {
return includePackageUDTs;
@@ -631,11 +631,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includePackageUDTs property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludePackageUDTs(Boolean value) {
this.includePackageUDTs = value;
@@ -643,11 +643,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether constants contained in packages should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludePackageConstants() {
return includePackageConstants;
@@ -655,11 +655,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includePackageConstants property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludePackageConstants(Boolean value) {
this.includePackageConstants = value;
@@ -667,11 +667,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether udts should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeUDTs() {
return includeUDTs;
@@ -679,11 +679,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeUDTs property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeUDTs(Boolean value) {
this.includeUDTs = value;
@@ -691,11 +691,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether domains should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeDomains() {
return includeDomains;
@@ -703,11 +703,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeDomains property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeDomains(Boolean value) {
this.includeDomains = value;
@@ -715,11 +715,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether sequences should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeSequences() {
return includeSequences;
@@ -727,11 +727,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeSequences property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeSequences(Boolean value) {
this.includeSequences = value;
@@ -739,11 +739,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether indexes should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeIndexes() {
return includeIndexes;
@@ -751,11 +751,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeIndexes property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeIndexes(Boolean value) {
this.includeIndexes = value;
@@ -763,11 +763,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether primary keys should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludePrimaryKeys() {
return includePrimaryKeys;
@@ -775,11 +775,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includePrimaryKeys property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludePrimaryKeys(Boolean value) {
this.includePrimaryKeys = value;
@@ -787,11 +787,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether unique keys should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeUniqueKeys() {
return includeUniqueKeys;
@@ -799,11 +799,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeUniqueKeys property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeUniqueKeys(Boolean value) {
this.includeUniqueKeys = value;
@@ -811,11 +811,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether foreign keys should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeForeignKeys() {
return includeForeignKeys;
@@ -823,11 +823,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeForeignKeys property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeForeignKeys(Boolean value) {
this.includeForeignKeys = value;
@@ -835,11 +835,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether check constraints should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeCheckConstraints() {
return includeCheckConstraints;
@@ -847,11 +847,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeCheckConstraints property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeCheckConstraints(Boolean value) {
this.includeCheckConstraints = value;
@@ -859,11 +859,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether system tables should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeSystemTables() {
return includeSystemTables;
@@ -871,11 +871,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeSystemTables property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeSystemTables(Boolean value) {
this.includeSystemTables = value;
@@ -883,11 +883,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether system generated indexes should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeSystemIndexes() {
return includeSystemIndexes;
@@ -895,11 +895,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeSystemIndexes property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeSystemIndexes(Boolean value) {
this.includeSystemIndexes = value;
@@ -907,11 +907,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether system generated check constraints should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeSystemCheckConstraints() {
return includeSystemCheckConstraints;
@@ -919,11 +919,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeSystemCheckConstraints property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeSystemCheckConstraints(Boolean value) {
this.includeSystemCheckConstraints = value;
@@ -931,11 +931,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether system generated sequences should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeSystemSequences() {
return includeSystemSequences;
@@ -943,11 +943,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeSystemSequences property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeSystemSequences(Boolean value) {
this.includeSystemSequences = value;
@@ -955,11 +955,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether system generated UDTs should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeSystemUDTs() {
return includeSystemUDTs;
@@ -967,11 +967,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeSystemUDTs property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeSystemUDTs(Boolean value) {
this.includeSystemUDTs = value;
@@ -979,11 +979,11 @@ public class Database implements Serializable, XMLAppendable
/**
* This flag indicates whether invisible columns should be included in output produced by this database
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIncludeInvisibleColumns() {
return includeInvisibleColumns;
@@ -991,11 +991,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the includeInvisibleColumns property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIncludeInvisibleColumns(Boolean value) {
this.includeInvisibleColumns = value;
@@ -1006,7 +1006,7 @@ public class Database implements Serializable, XMLAppendable
*
* This is a Java regular expression. Use the pipe to separate several expressions.
* See {@link org.jooq.UpdatableRecord#store()} and {@link org.jooq.UpdatableRecord#delete()} for details about optimistic locking.
- *
+ *
*/
public String getRecordVersionFields() {
return recordVersionFields;
@@ -1017,7 +1017,7 @@ public class Database implements Serializable, XMLAppendable
*
* This is a Java regular expression. Use the pipe to separate several expressions.
* See {@link org.jooq.UpdatableRecord#store()} and {@link org.jooq.UpdatableRecord#delete()} for details about optimistic locking.
- *
+ *
*/
public void setRecordVersionFields(String value) {
this.recordVersionFields = value;
@@ -1028,7 +1028,7 @@ public class Database implements Serializable, XMLAppendable
*
* This is a Java regular expression. Use the pipe to separate several expressions.
* See {@link org.jooq.UpdatableRecord#store()} and {@link org.jooq.UpdatableRecord#delete()} for details about optimistic locking.
- *
+ *
*/
public String getRecordTimestampFields() {
return recordTimestampFields;
@@ -1039,7 +1039,7 @@ public class Database implements Serializable, XMLAppendable
*
* This is a Java regular expression. Use the pipe to separate several expressions.
* See {@link org.jooq.UpdatableRecord#store()} and {@link org.jooq.UpdatableRecord#delete()} for details about optimistic locking.
- *
+ *
*/
public void setRecordTimestampFields(String value) {
this.recordTimestampFields = value;
@@ -1047,7 +1047,7 @@ public class Database implements Serializable, XMLAppendable
/**
* The synthetic objects configuration.
- *
+ *
*/
public SyntheticObjectsType getSyntheticObjects() {
return syntheticObjects;
@@ -1055,7 +1055,7 @@ public class Database implements Serializable, XMLAppendable
/**
* The synthetic objects configuration.
- *
+ *
*/
public void setSyntheticObjects(SyntheticObjectsType value) {
this.syntheticObjects = value;
@@ -1065,7 +1065,7 @@ public class Database implements Serializable, XMLAppendable
* A regular expression matching all columns that represent identities.
*
* To be used if columns are not detected as automatically as identities.
- *
+ *
*/
public String getSyntheticIdentities() {
return syntheticIdentities;
@@ -1075,7 +1075,7 @@ public class Database implements Serializable, XMLAppendable
* A regular expression matching all columns that represent identities.
*
* To be used if columns are not detected as automatically as identities.
- *
+ *
*/
public void setSyntheticIdentities(String value) {
this.syntheticIdentities = value;
@@ -1094,7 +1094,7 @@ public class Database implements Serializable, XMLAppendable
*
*
* Synthetic primary keys will override existing primary keys.
- *
+ *
*/
public String getSyntheticPrimaryKeys() {
return syntheticPrimaryKeys;
@@ -1113,7 +1113,7 @@ public class Database implements Serializable, XMLAppendable
*
*
* Synthetic primary keys will override existing primary keys.
- *
+ *
*/
public void setSyntheticPrimaryKeys(String value) {
this.syntheticPrimaryKeys = value;
@@ -1134,7 +1134,7 @@ public class Database implements Serializable, XMLAppendable
* 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.
- *
+ *
*/
public String getOverridePrimaryKeys() {
return overridePrimaryKeys;
@@ -1155,7 +1155,7 @@ public class Database implements Serializable, XMLAppendable
* 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.
- *
+ *
*/
public void setOverridePrimaryKeys(String value) {
this.overridePrimaryKeys = value;
@@ -1163,11 +1163,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Generate {@link java.sql.Timestamp} fields for DATE columns. This is particularly useful for Oracle databases
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isDateAsTimestamp() {
return dateAsTimestamp;
@@ -1175,11 +1175,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the dateAsTimestamp property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setDateAsTimestamp(Boolean value) {
this.dateAsTimestamp = value;
@@ -1195,11 +1195,11 @@ public class Database implements Serializable, XMLAppendable
*
* @deprecated This feature is deprecated as of jOOQ 3.6.0 and will be removed again in
* jOOQ 4.0.
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
@Deprecated
public Boolean isIgnoreProcedureReturnValues() {
@@ -1208,11 +1208,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the ignoreProcedureReturnValues property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
@Deprecated
public void setIgnoreProcedureReturnValues(Boolean value) {
@@ -1221,11 +1221,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Generate jOOU data types for your unsigned data types, which are not natively supported in Java
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isUnsignedTypes() {
return unsignedTypes;
@@ -1233,11 +1233,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the unsignedTypes property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setUnsignedTypes(Boolean value) {
this.unsignedTypes = value;
@@ -1245,11 +1245,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Include display width in type declaration. In some RDBMS (e.g. MariaDB, MySQL), fixed width integer types are optionally accompanied by a display width. This is sometimes abused to model BOOLEAN types via TINYINT(1). This flag allows for including that display width in the type declaration exposed by jOOQ-meta code, as if it were a numeric precision.
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isIntegerDisplayWidths() {
return integerDisplayWidths;
@@ -1257,11 +1257,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the integerDisplayWidths property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setIntegerDisplayWidths(Boolean value) {
this.integerDisplayWidths = value;
@@ -1272,7 +1272,7 @@ public class Database implements Serializable, XMLAppendable
*
* This cannot be combined with the {@link #getCatalogs()} configuration element.
* If left empty (and without any {@link #getCatalogs()} configuration element), jOOQ will generate all available catalogs.
- *
+ *
*/
public String getInputCatalog() {
return inputCatalog;
@@ -1283,7 +1283,7 @@ public class Database implements Serializable, XMLAppendable
*
* This cannot be combined with the {@link #getCatalogs()} configuration element.
* If left empty (and without any {@link #getCatalogs()} configuration element), jOOQ will generate all available catalogs.
- *
+ *
*/
public void setInputCatalog(String value) {
this.inputCatalog = value;
@@ -1297,7 +1297,7 @@ public class Database implements Serializable, XMLAppendable
* will be the same as {@link #getInputCatalog()}
*
* This will be ignored if {@link #isOutputCatalogToDefault()} is set to true
- *
+ *
*/
public String getOutputCatalog() {
return outputCatalog;
@@ -1311,7 +1311,7 @@ public class Database implements Serializable, XMLAppendable
* will be the same as {@link #getInputCatalog()}
*
* This will be ignored if {@link #isOutputCatalogToDefault()} is set to true
- *
+ *
*/
public void setOutputCatalog(String value) {
this.outputCatalog = value;
@@ -1320,11 +1320,11 @@ public class Database implements Serializable, XMLAppendable
/**
* A flag to indicate that the outputCatalog should be the "default" catalog,
* which generates catalog-less, unqualified tables, procedures, etc.
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isOutputCatalogToDefault() {
return outputCatalogToDefault;
@@ -1332,11 +1332,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the outputCatalogToDefault property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setOutputCatalogToDefault(Boolean value) {
this.outputCatalogToDefault = value;
@@ -1347,7 +1347,7 @@ public class Database implements Serializable, XMLAppendable
*
* This cannot be combined with the {@link #getSchemata()} configuration element.
* If left empty (and without any {@link #getSchemata()} configuration element), jOOQ will generate all available schemata.
- *
+ *
*/
public String getInputSchema() {
return inputSchema;
@@ -1358,7 +1358,7 @@ public class Database implements Serializable, XMLAppendable
*
* This cannot be combined with the {@link #getSchemata()} configuration element.
* If left empty (and without any {@link #getSchemata()} configuration element), jOOQ will generate all available schemata.
- *
+ *
*/
public void setInputSchema(String value) {
this.inputSchema = value;
@@ -1370,9 +1370,9 @@ public class Database implements Serializable, XMLAppendable
* Use this to override your local development
* schema name for source code generation. If not specified, this
* will be the same as {@link #getInputSchema()}.
- *
+ *
* This will be ignored if {@link #isOutputSchemaToDefault()} is set to true
- *
+ *
*/
public String getOutputSchema() {
return outputSchema;
@@ -1384,9 +1384,9 @@ public class Database implements Serializable, XMLAppendable
* Use this to override your local development
* schema name for source code generation. If not specified, this
* will be the same as {@link #getInputSchema()}.
- *
+ *
* This will be ignored if {@link #isOutputSchemaToDefault()} is set to true
- *
+ *
*/
public void setOutputSchema(String value) {
this.outputSchema = value;
@@ -1395,11 +1395,11 @@ public class Database implements Serializable, XMLAppendable
/**
* A flag to indicate that the outputSchema should be the "default" schema,
* which generates schema-less, unqualified tables, procedures, etc.
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isOutputSchemaToDefault() {
return outputSchemaToDefault;
@@ -1407,11 +1407,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the outputSchemaToDefault property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setOutputSchemaToDefault(Boolean value) {
this.outputSchemaToDefault = value;
@@ -1432,7 +1432,7 @@ public class Database implements Serializable, XMLAppendable
*
* Schema versions will be generated into the {@link javax.annotation.processing.Generated} annotation on
* generated artefacts.
- *
+ *
*/
public String getSchemaVersionProvider() {
return schemaVersionProvider;
@@ -1453,7 +1453,7 @@ public class Database implements Serializable, XMLAppendable
*
* Schema versions will be generated into the {@link javax.annotation.processing.Generated} annotation on
* generated artefacts.
- *
+ *
*/
public void setSchemaVersionProvider(String value) {
this.schemaVersionProvider = value;
@@ -1473,7 +1473,7 @@ public class Database implements Serializable, XMLAppendable
*
* Catalog versions will be generated into the {@link javax.annotation.processing.Generated} annotation on
* generated artefacts.
- *
+ *
*/
public String getCatalogVersionProvider() {
return catalogVersionProvider;
@@ -1493,7 +1493,7 @@ public class Database implements Serializable, XMLAppendable
*
* Catalog versions will be generated into the {@link javax.annotation.processing.Generated} annotation on
* generated artefacts.
- *
+ *
*/
public void setCatalogVersionProvider(String value) {
this.catalogVersionProvider = value;
@@ -1503,7 +1503,7 @@ public class Database implements Serializable, XMLAppendable
* A custom {@link java.util.Comparator} that can compare two {@link org.jooq.meta.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.
- *
+ *
*/
public String getOrderProvider() {
return orderProvider;
@@ -1513,7 +1513,7 @@ public class Database implements Serializable, XMLAppendable
* A custom {@link java.util.Comparator} that can compare two {@link org.jooq.meta.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.
- *
+ *
*/
public void setOrderProvider(String value) {
this.orderProvider = value;
@@ -1523,7 +1523,7 @@ public class Database implements Serializable, XMLAppendable
* A regular expression matching all primary key declarations for which wrapper types should be generated, and for their referencing foreign keys.
*
* This feature is available in the commercial distribution only.
- *
+ *
*/
public String getEmbeddablePrimaryKeys() {
return embeddablePrimaryKeys;
@@ -1533,7 +1533,7 @@ public class Database implements Serializable, XMLAppendable
* A regular expression matching all primary key declarations for which wrapper types should be generated, and for their referencing foreign keys.
*
* This feature is available in the commercial distribution only.
- *
+ *
*/
public void setEmbeddablePrimaryKeys(String value) {
this.embeddablePrimaryKeys = value;
@@ -1543,7 +1543,7 @@ public class Database implements Serializable, XMLAppendable
* A regular expression matching all unique key declarations for which wrapper types should be generated, and for their referencing foreign keys.
*
* This feature is available in the commercial distribution only.
- *
+ *
*/
public String getEmbeddableUniqueKeys() {
return embeddableUniqueKeys;
@@ -1553,7 +1553,7 @@ public class Database implements Serializable, XMLAppendable
* A regular expression matching all unique key declarations for which wrapper types should be generated, and for their referencing foreign keys.
*
* This feature is available in the commercial distribution only.
- *
+ *
*/
public void setEmbeddableUniqueKeys(String value) {
this.embeddableUniqueKeys = value;
@@ -1563,7 +1563,7 @@ public class Database implements Serializable, XMLAppendable
* A regular expression matching all domain type declarations for which wrapper types should be generated.
*
* This feature is available in the commercial distribution only.
- *
+ *
*/
public String getEmbeddableDomains() {
return embeddableDomains;
@@ -1573,7 +1573,7 @@ public class Database implements Serializable, XMLAppendable
* A regular expression matching all domain type declarations for which wrapper types should be generated.
*
* This feature is available in the commercial distribution only.
- *
+ *
*/
public void setEmbeddableDomains(String value) {
this.embeddableDomains = value;
@@ -1583,11 +1583,11 @@ public class Database implements Serializable, XMLAppendable
* Whether identity columns should expose {@link org.jooq.DataType#readonly()} behaviour.
*
* This feature is available in the commercial distribution only.
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isReadonlyIdentities() {
return readonlyIdentities;
@@ -1595,11 +1595,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the readonlyIdentities property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setReadonlyIdentities(Boolean value) {
this.readonlyIdentities = value;
@@ -1609,11 +1609,11 @@ public class Database implements Serializable, XMLAppendable
* Whether computed columns should expose {@link org.jooq.DataType#readonly()} behaviour.
*
* This feature is available in the commercial distribution only.
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isReadonlyComputedColumns() {
return readonlyComputedColumns;
@@ -1621,11 +1621,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the readonlyComputedColumns property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setReadonlyComputedColumns(Boolean value) {
this.readonlyComputedColumns = value;
@@ -1635,11 +1635,11 @@ public class Database implements Serializable, XMLAppendable
* Whether columns that are known not to be updatable (e.g. in views) should expose {@link org.jooq.DataType#readonly()} behaviour.
*
* This feature is available in the commercial distribution only.
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isReadonlyNonUpdatableColumns() {
return readonlyNonUpdatableColumns;
@@ -1647,11 +1647,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the readonlyNonUpdatableColumns property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setReadonlyNonUpdatableColumns(Boolean value) {
this.readonlyNonUpdatableColumns = value;
@@ -1659,11 +1659,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Historically, zero-scale decimal types are generated as their most appropriate, corresponding integer type (e.g. NUMBER(2, 0) and less: Byte). This allows for turning off this feature. In case of conflict between this rule and actual {@link #getForcedTypes()}, the latter will win.
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isForceIntegerTypesOnZeroScaleDecimals() {
return forceIntegerTypesOnZeroScaleDecimals;
@@ -1671,11 +1671,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the forceIntegerTypesOnZeroScaleDecimals property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setForceIntegerTypesOnZeroScaleDecimals(Boolean value) {
this.forceIntegerTypesOnZeroScaleDecimals = value;
@@ -1691,11 +1691,11 @@ public class Database implements Serializable, XMLAppendable
*
* While this flag defaults to true for most databases, it defaults to false
* for Oracle.
- *
+ *
* @return
* possible object is
* {@link Boolean }
- *
+ *
*/
public Boolean isTableValuedFunctions() {
return tableValuedFunctions;
@@ -1703,11 +1703,11 @@ public class Database implements Serializable, XMLAppendable
/**
* Sets the value of the tableValuedFunctions property.
- *
+ *
* @param value
* allowed object is
* {@link Boolean }
- *
+ *
*/
public void setTableValuedFunctions(Boolean value) {
this.tableValuedFunctions = value;
@@ -1715,7 +1715,7 @@ public class Database implements Serializable, XMLAppendable
/**
* The number of seconds that are considered "slow" before a query is logged to indicate a bug, 0 for not logging.
- *
+ *
*/
public Integer getLogSlowQueriesAfterSeconds() {
return logSlowQueriesAfterSeconds;
@@ -1723,7 +1723,7 @@ public class Database implements Serializable, XMLAppendable
/**
* The number of seconds that are considered "slow" before a query is logged to indicate a bug, 0 for not logging.
- *
+ *
*/
public void setLogSlowQueriesAfterSeconds(Integer value) {
this.logSlowQueriesAfterSeconds = value;
@@ -1731,7 +1731,7 @@ public class Database implements Serializable, XMLAppendable
/**
* The number of seconds that are considered "slow" before a result set is logged to indicate a bug, 0 for not logging.
- *
+ *
*/
public Integer getLogSlowResultsAfterSeconds() {
return logSlowResultsAfterSeconds;
@@ -1739,7 +1739,7 @@ public class Database implements Serializable, XMLAppendable
/**
* The number of seconds that are considered "slow" before a result set is logged to indicate a bug, 0 for not logging.
- *
+ *
*/
public void setLogSlowResultsAfterSeconds(Integer value) {
this.logSlowResultsAfterSeconds = value;
@@ -1882,7 +1882,7 @@ public class Database implements Serializable, XMLAppendable
*
* You can also provide your own org.jooq.meta.Database implementation
* here, if your database is currently not supported
- *
+ *
*/
public Database withName(String value) {
setName(value);
@@ -1893,25 +1893,25 @@ public class Database implements Serializable, XMLAppendable
* The flags that will be applied to all regular expressions from this configuration by default.
*
* 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
* For example, to add a new item, do as follows:
*
* Objects of the following type(s) are allowed in the list
* {@link RegexFlag }
- *
- *
+ *
+ *
*/
public Database withRegexFlags(RegexFlag... values) {
if (values!= null) {
@@ -1926,25 +1926,25 @@ public class Database implements Serializable, XMLAppendable
* The flags that will be applied to all regular expressions from this configuration by default.
*
* 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
* For example, to add a new item, do as follows:
*
* Objects of the following type(s) are allowed in the list
* {@link RegexFlag }
- *
- *
+ *
+ *
*/
public Database withRegexFlags(Collection
* Whitespace is ignored and comments are possible unless overridden in {@link #getRegexFlags()}.
- *
+ *
*/
public Database withIncludes(String value) {
setIncludes(value);
@@ -1986,7 +1986,7 @@ public class Database implements Serializable, XMLAppendable
*
* This is a Java regular expression. Use the pipe to separate several expressions.
* Excludes match before includes, i.e. excludes have a higher priority.
- *
+ *
*/
public Database withExcludes(String value) {
setExcludes(value);
@@ -2118,7 +2118,7 @@ public class Database implements Serializable, XMLAppendable
*
* This is a Java regular expression. Use the pipe to separate several expressions.
* See {@link org.jooq.UpdatableRecord#store()} and {@link org.jooq.UpdatableRecord#delete()} for details about optimistic locking.
- *
+ *
*/
public Database withRecordVersionFields(String value) {
setRecordVersionFields(value);
@@ -2130,7 +2130,7 @@ public class Database implements Serializable, XMLAppendable
*
* This is a Java regular expression. Use the pipe to separate several expressions.
* See {@link org.jooq.UpdatableRecord#store()} and {@link org.jooq.UpdatableRecord#delete()} for details about optimistic locking.
- *
+ *
*/
public Database withRecordTimestampFields(String value) {
setRecordTimestampFields(value);
@@ -2139,7 +2139,7 @@ public class Database implements Serializable, XMLAppendable
/**
* The synthetic objects configuration.
- *
+ *
*/
public Database withSyntheticObjects(SyntheticObjectsType value) {
setSyntheticObjects(value);
@@ -2150,7 +2150,7 @@ public class Database implements Serializable, XMLAppendable
* A regular expression matching all columns that represent identities.
*
* To be used if columns are not detected as automatically as identities.
- *
+ *
*/
public Database withSyntheticIdentities(String value) {
setSyntheticIdentities(value);
@@ -2170,7 +2170,7 @@ public class Database implements Serializable, XMLAppendable
*
*
* Synthetic primary keys will override existing primary keys.
- *
+ *
*/
public Database withSyntheticPrimaryKeys(String value) {
setSyntheticPrimaryKeys(value);
@@ -2192,7 +2192,7 @@ public class Database implements Serializable, XMLAppendable
* 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.
- *
+ *
*/
public Database withOverridePrimaryKeys(String value) {
setOverridePrimaryKeys(value);
@@ -2224,7 +2224,7 @@ public class Database implements Serializable, XMLAppendable
*
* This cannot be combined with the {@link #getCatalogs()} configuration element.
* If left empty (and without any {@link #getCatalogs()} configuration element), jOOQ will generate all available catalogs.
- *
+ *
*/
public Database withInputCatalog(String value) {
setInputCatalog(value);
@@ -2239,7 +2239,7 @@ public class Database implements Serializable, XMLAppendable
* will be the same as {@link #getInputCatalog()}
*
* This will be ignored if {@link #isOutputCatalogToDefault()} is set to true
- *
+ *
*/
public Database withOutputCatalog(String value) {
setOutputCatalog(value);
@@ -2256,7 +2256,7 @@ public class Database implements Serializable, XMLAppendable
*
* This cannot be combined with the {@link #getSchemata()} configuration element.
* If left empty (and without any {@link #getSchemata()} configuration element), jOOQ will generate all available schemata.
- *
+ *
*/
public Database withInputSchema(String value) {
setInputSchema(value);
@@ -2269,9 +2269,9 @@ public class Database implements Serializable, XMLAppendable
* Use this to override your local development
* schema name for source code generation. If not specified, this
* will be the same as {@link #getInputSchema()}.
- *
+ *
* This will be ignored if {@link #isOutputSchemaToDefault()} is set to true
- *
+ *
*/
public Database withOutputSchema(String value) {
setOutputSchema(value);
@@ -2298,7 +2298,7 @@ public class Database implements Serializable, XMLAppendable
*
* Schema versions will be generated into the {@link javax.annotation.processing.Generated} annotation on
* generated artefacts.
- *
+ *
*/
public Database withSchemaVersionProvider(String value) {
setSchemaVersionProvider(value);
@@ -2319,7 +2319,7 @@ public class Database implements Serializable, XMLAppendable
*
* Catalog versions will be generated into the {@link javax.annotation.processing.Generated} annotation on
* generated artefacts.
- *
+ *
*/
public Database withCatalogVersionProvider(String value) {
setCatalogVersionProvider(value);
@@ -2330,7 +2330,7 @@ public class Database implements Serializable, XMLAppendable
* A custom {@link java.util.Comparator} that can compare two {@link org.jooq.meta.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.
- *
+ *
*/
public Database withOrderProvider(String value) {
setOrderProvider(value);
@@ -2341,7 +2341,7 @@ public class Database implements Serializable, XMLAppendable
* A regular expression matching all primary key declarations for which wrapper types should be generated, and for their referencing foreign keys.
*
* This feature is available in the commercial distribution only.
- *
+ *
*/
public Database withEmbeddablePrimaryKeys(String value) {
setEmbeddablePrimaryKeys(value);
@@ -2352,7 +2352,7 @@ public class Database implements Serializable, XMLAppendable
* A regular expression matching all unique key declarations for which wrapper types should be generated, and for their referencing foreign keys.
*
* This feature is available in the commercial distribution only.
- *
+ *
*/
public Database withEmbeddableUniqueKeys(String value) {
setEmbeddableUniqueKeys(value);
@@ -2363,7 +2363,7 @@ public class Database implements Serializable, XMLAppendable
* A regular expression matching all domain type declarations for which wrapper types should be generated.
*
* This feature is available in the commercial distribution only.
- *
+ *
*/
public Database withEmbeddableDomains(String value) {
setEmbeddableDomains(value);
@@ -2397,7 +2397,7 @@ public class Database implements Serializable, XMLAppendable
/**
* The number of seconds that are considered "slow" before a query is logged to indicate a bug, 0 for not logging.
- *
+ *
*/
public Database withLogSlowQueriesAfterSeconds(Integer value) {
setLogSlowQueriesAfterSeconds(value);
@@ -2406,7 +2406,7 @@ public class Database implements Serializable, XMLAppendable
/**
* The number of seconds that are considered "slow" before a result set is logged to indicate a bug, 0 for not logging.
- *
+ *
*/
public Database withLogSlowResultsAfterSeconds(Integer value) {
setLogSlowResultsAfterSeconds(value);
diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Jdbc.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Jdbc.java
index e2e4234cda..903d794d4b 100644
--- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Jdbc.java
+++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Jdbc.java
@@ -47,6 +47,10 @@ public class Jdbc implements Serializable, XMLAppendable
@XmlJavaTypeAdapter(StringAdapter.class)
protected String password;
protected Boolean autoCommit;
+ @XmlJavaTypeAdapter(StringAdapter.class)
+ protected String initScript;
+ @XmlJavaTypeAdapter(StringAdapter.class)
+ protected String initSeparator;
@XmlElementWrapper(name = "properties")
@XmlElement(name = "property")
protected List(?i:expr)
* (?i:expr)
* set method for the regexFlags property.
- *
+ *
*
* getRegexFlags().add(newItem);
*
- *
- *
+ *
+ *
* set method for the regexFlags property.
- *
+ *
*
* getRegexFlags().add(newItem);
*
- *
- *
+ *
+ *
* (?i:expr)
*