diff --git a/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java b/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java
index 4e6449c46a..90fd19a7e5 100644
--- a/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java
+++ b/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java
@@ -468,6 +468,9 @@ public class GenerationTool {
database.setIncludeExcludeColumns(TRUE.equals(d.isIncludeExcludeColumns()));
database.setIncludeForeignKeys(!FALSE.equals(d.isIncludeForeignKeys()));
database.setIncludePackages(!FALSE.equals(d.isIncludePackages()));
+ database.setIncludePackageRoutines(!FALSE.equals(d.isIncludePackageRoutines()));
+ database.setIncludePackageUDTs(!FALSE.equals(d.isIncludePackageUDTs()));
+ database.setIncludePackageConstants(!FALSE.equals(d.isIncludePackageConstants()));
database.setIncludeIndexes(!FALSE.equals(d.isIncludeIndexes()));
database.setIncludePrimaryKeys(!FALSE.equals(d.isIncludePrimaryKeys()));
database.setIncludeRoutines(!FALSE.equals(d.isIncludeRoutines()));
diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.11.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.11.xml
index 4fc256f136..0cd4af1be8 100644
--- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.11.xml
+++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.11.xml
@@ -15230,6 +15230,9 @@ result.forEach((Object[] entities) -> {
true
true
true
+ true
+ true
+ true
true
false
false
@@ -15249,6 +15252,9 @@ result.forEach((Object[] entities) -> {
.withIncludeTables(true)
.withIncludeRoutines(true)
.withIncludePackages(true)
+ .withIncludePackageRoutines(true)
+ .withIncludePackageUDTs(true)
+ .withIncludePackageConstants(true)
.withIncludeUDTs(true)
.withIncludeSequences(false)
.withIncludePrimaryKeys(false)
@@ -15265,6 +15271,9 @@ result.forEach((Object[] entities) -> {
includeTables = true
includeRoutines = true
includePackages = true
+ includePackageRoutines = true
+ includePackageUDTs = true
+ includePackageConstants = true
includeUDTs = true
includeSequences = false
includePrimaryKeys = false
diff --git a/jOOQ-meta/src/main/java/org/jooq/util/AbstractDatabase.java b/jOOQ-meta/src/main/java/org/jooq/util/AbstractDatabase.java
index 63fd7f216c..2ec7d4c724 100644
--- a/jOOQ-meta/src/main/java/org/jooq/util/AbstractDatabase.java
+++ b/jOOQ-meta/src/main/java/org/jooq/util/AbstractDatabase.java
@@ -111,6 +111,9 @@ public abstract class AbstractDatabase implements Database {
private boolean includeRoutines = true;
private boolean includeTriggerRoutines = false;
private boolean includePackages = true;
+ private boolean includePackageRoutines = true;
+ private boolean includePackageUDTs = true;
+ private boolean includePackageConstants = true;
private boolean includeUDTs = true;
private boolean includeSequences = true;
private boolean includeIndexes = true;
@@ -759,6 +762,36 @@ public abstract class AbstractDatabase implements Database {
this.includePackages = includePackages;
}
+ @Override
+ public final boolean getIncludePackageRoutines() {
+ return includePackageRoutines;
+ }
+
+ @Override
+ public final void setIncludePackageRoutines(boolean includePackageRoutines) {
+ this.includePackageRoutines = includePackageRoutines;
+ }
+
+ @Override
+ public final boolean getIncludePackageUDTs() {
+ return includePackageUDTs;
+ }
+
+ @Override
+ public final void setIncludePackageUDTs(boolean includePackageUDTs) {
+ this.includePackageUDTs = includePackageUDTs;
+ }
+
+ @Override
+ public final boolean getIncludePackageConstants() {
+ return includePackageConstants;
+ }
+
+ @Override
+ public final void setIncludePackageConstants(boolean includePackageConstants) {
+ this.includePackageConstants = includePackageConstants;
+ }
+
@Override
public final boolean getIncludeUDTs() {
return includeUDTs;
diff --git a/jOOQ-meta/src/main/java/org/jooq/util/AbstractPackageDefinition.java b/jOOQ-meta/src/main/java/org/jooq/util/AbstractPackageDefinition.java
index c613a19b36..e992bd4d4c 100644
--- a/jOOQ-meta/src/main/java/org/jooq/util/AbstractPackageDefinition.java
+++ b/jOOQ-meta/src/main/java/org/jooq/util/AbstractPackageDefinition.java
@@ -72,11 +72,13 @@ public abstract class AbstractPackageDefinition extends AbstractDefinition imple
if (routines == null) {
routines = new ArrayList();
- try {
- routines = getRoutines0();
- }
- catch (Exception e) {
- log.error("Error while initialising package", e);
+ if (getDatabase().getIncludePackageRoutines()) {
+ try {
+ routines = getRoutines0();
+ }
+ catch (Exception e) {
+ log.error("Error while initialising package", e);
+ }
}
}
@@ -90,11 +92,13 @@ public abstract class AbstractPackageDefinition extends AbstractDefinition imple
if (constants == null) {
constants = new ArrayList();
- try {
- constants = getConstants0();
- }
- catch (Exception e) {
- log.error("Error while initialising package", e);
+ if (getDatabase().getIncludePackageConstants()) {
+ try {
+ constants = getConstants0();
+ }
+ catch (Exception e) {
+ log.error("Error while initialising package", e);
+ }
}
}
diff --git a/jOOQ-meta/src/main/java/org/jooq/util/Database.java b/jOOQ-meta/src/main/java/org/jooq/util/Database.java
index b18b19acc9..ae1280bef2 100644
--- a/jOOQ-meta/src/main/java/org/jooq/util/Database.java
+++ b/jOOQ-meta/src/main/java/org/jooq/util/Database.java
@@ -451,6 +451,36 @@ public interface Database extends AutoCloseable {
*/
boolean getIncludePackages();
+ /**
+ * whether package routines should be included.
+ */
+ void setIncludePackageRoutines(boolean includePackageRoutines);
+
+ /**
+ * whether package routines should be included.
+ */
+ boolean getIncludePackageRoutines();
+
+ /**
+ * whether package UDTs should be included.
+ */
+ void setIncludePackageUDTs(boolean includePackageUDTs);
+
+ /**
+ * whether package UDTs should be included.
+ */
+ boolean getIncludePackageUDTs();
+
+ /**
+ * whether package constants should be included.
+ */
+ void setIncludePackageConstants(boolean includePackageConstants);
+
+ /**
+ * whether package constants should be included.
+ */
+ boolean getIncludePackageConstants();
+
/**
* whether routines should be included.
*/
diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Database.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Database.java
index 84e792deca..317a4ad99f 100644
--- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Database.java
+++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Database.java
@@ -63,6 +63,12 @@ public class Database implements Serializable
@XmlElement(defaultValue = "true")
protected Boolean includePackages = true;
@XmlElement(defaultValue = "true")
+ protected Boolean includePackageRoutines = true;
+ @XmlElement(defaultValue = "true")
+ protected Boolean includePackageUDTs = true;
+ @XmlElement(defaultValue = "true")
+ protected Boolean includePackageConstants = true;
+ @XmlElement(defaultValue = "true")
protected Boolean includeUDTs = true;
@XmlElement(defaultValue = "true")
protected Boolean includeSequences = true;
@@ -415,6 +421,78 @@ public class Database implements Serializable
this.includePackages = value;
}
+ /**
+ * 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;
+ }
+
+ /**
+ * Sets the value of the includePackageRoutines property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setIncludePackageRoutines(Boolean value) {
+ this.includePackageRoutines = value;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Sets the value of the includePackageUDTs property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setIncludePackageUDTs(Boolean value) {
+ this.includePackageUDTs = value;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Sets the value of the includePackageConstants property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setIncludePackageConstants(Boolean value) {
+ this.includePackageConstants = value;
+ }
+
/**
* This flag indicates whether udts should be included in output produced by this database
*
@@ -1208,6 +1286,21 @@ public class Database implements Serializable
return this;
}
+ public Database withIncludePackageRoutines(Boolean value) {
+ setIncludePackageRoutines(value);
+ return this;
+ }
+
+ public Database withIncludePackageUDTs(Boolean value) {
+ setIncludePackageUDTs(value);
+ return this;
+ }
+
+ public Database withIncludePackageConstants(Boolean value) {
+ setIncludePackageConstants(value);
+ return this;
+ }
+
public Database withIncludeUDTs(Boolean value) {
setIncludeUDTs(value);
return this;
@@ -1502,6 +1595,21 @@ public class Database implements Serializable
sb.append(includePackages);
sb.append("");
}
+ if (includePackageRoutines!= null) {
+ sb.append("");
+ sb.append(includePackageRoutines);
+ sb.append("");
+ }
+ if (includePackageUDTs!= null) {
+ sb.append("");
+ sb.append(includePackageUDTs);
+ sb.append("");
+ }
+ if (includePackageConstants!= null) {
+ sb.append("");
+ sb.append(includePackageConstants);
+ sb.append("");
+ }
if (includeUDTs!= null) {
sb.append("");
sb.append(includeUDTs);
@@ -1748,6 +1856,33 @@ public class Database implements Serializable
return false;
}
}
+ if (includePackageRoutines == null) {
+ if (other.includePackageRoutines!= null) {
+ return false;
+ }
+ } else {
+ if (!includePackageRoutines.equals(other.includePackageRoutines)) {
+ return false;
+ }
+ }
+ if (includePackageUDTs == null) {
+ if (other.includePackageUDTs!= null) {
+ return false;
+ }
+ } else {
+ if (!includePackageUDTs.equals(other.includePackageUDTs)) {
+ return false;
+ }
+ }
+ if (includePackageConstants == null) {
+ if (other.includePackageConstants!= null) {
+ return false;
+ }
+ } else {
+ if (!includePackageConstants.equals(other.includePackageConstants)) {
+ return false;
+ }
+ }
if (includeUDTs == null) {
if (other.includeUDTs!= null) {
return false;
@@ -2034,6 +2169,9 @@ public class Database implements Serializable
result = ((prime*result)+((includeRoutines == null)? 0 :includeRoutines.hashCode()));
result = ((prime*result)+((includeTriggerRoutines == null)? 0 :includeTriggerRoutines.hashCode()));
result = ((prime*result)+((includePackages == null)? 0 :includePackages.hashCode()));
+ result = ((prime*result)+((includePackageRoutines == null)? 0 :includePackageRoutines.hashCode()));
+ result = ((prime*result)+((includePackageUDTs == null)? 0 :includePackageUDTs.hashCode()));
+ result = ((prime*result)+((includePackageConstants == null)? 0 :includePackageConstants.hashCode()));
result = ((prime*result)+((includeUDTs == null)? 0 :includeUDTs.hashCode()));
result = ((prime*result)+((includeSequences == null)? 0 :includeSequences.hashCode()));
result = ((prime*result)+((includeIndexes == null)? 0 :includeIndexes.hashCode()));
diff --git a/jOOQ-meta/src/main/resources/xsd/jooq-codegen-3.11.0.xsd b/jOOQ-meta/src/main/resources/xsd/jooq-codegen-3.11.0.xsd
index d062614052..a0af5728d2 100644
--- a/jOOQ-meta/src/main/resources/xsd/jooq-codegen-3.11.0.xsd
+++ b/jOOQ-meta/src/main/resources/xsd/jooq-codegen-3.11.0.xsd
@@ -452,6 +452,18 @@ Excludes match before includes, i.e. excludes have a higher priority.]]>
+
+
+
+
+
+
+
+
+
+
+
+