From 65556fe9b64d1cf6a9cda450288a83e346b085d3 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Wed, 16 Aug 2023 14:14:08 +0200 Subject: [PATCH] [jOOQ/jOOQ#6182] Support renaming Keys with matcher strategy --- .../org/jooq/codegen/MatcherStrategy.java | 57 +++++-- .../java/org/jooq/meta/jaxb/Matchers.java | 94 ++++++++++++ .../meta/jaxb/MatchersForeignKeyType.java | 111 +++++++++----- .../meta/jaxb/MatchersPrimaryKeyType.java | 140 ++++++++++++++++++ .../jooq/meta/jaxb/MatchersUniqueKeyType.java | 140 ++++++++++++++++++ .../org/jooq/meta/jaxb/ObjectFactory.java | 16 ++ .../org/jooq/meta/xsd/jooq-codegen-3.19.0.xsd | 56 ++++++- 7 files changed, 561 insertions(+), 53 deletions(-) create mode 100644 jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersPrimaryKeyType.java create mode 100644 jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersUniqueKeyType.java diff --git a/jOOQ-codegen/src/main/java/org/jooq/codegen/MatcherStrategy.java b/jOOQ-codegen/src/main/java/org/jooq/codegen/MatcherStrategy.java index 6a3e77b38c..f7e32a8a86 100644 --- a/jOOQ-codegen/src/main/java/org/jooq/codegen/MatcherStrategy.java +++ b/jOOQ-codegen/src/main/java/org/jooq/codegen/MatcherStrategy.java @@ -59,17 +59,8 @@ import org.jooq.meta.RoutineDefinition; import org.jooq.meta.SchemaDefinition; import org.jooq.meta.SequenceDefinition; import org.jooq.meta.TableDefinition; -import org.jooq.meta.jaxb.MatcherRule; -import org.jooq.meta.jaxb.MatcherTransformType; -import org.jooq.meta.jaxb.Matchers; -import org.jooq.meta.jaxb.MatchersCatalogType; +import org.jooq.meta.UniqueKeyDefinition; import org.jooq.meta.jaxb.*; -import org.jooq.meta.jaxb.MatchersEnumType; -import org.jooq.meta.jaxb.MatchersFieldType; -import org.jooq.meta.jaxb.MatchersRoutineType; -import org.jooq.meta.jaxb.MatchersSchemaType; -import org.jooq.meta.jaxb.MatchersSequenceType; -import org.jooq.meta.jaxb.MatchersTableType; import org.jooq.tools.StringUtils; /** @@ -195,6 +186,22 @@ public class MatcherStrategy extends DefaultGeneratorStrategy { return emptyList(); } + private final List primaryKeys(Definition definition) { + if (definition instanceof UniqueKeyDefinition u) + if (u.isPrimaryKey()) + return matchers.getPrimaryKeys(); + + return emptyList(); + } + + private final List uniqueKeys(Definition definition) { + if (definition instanceof UniqueKeyDefinition u) + if (!u.isPrimaryKey()) + return matchers.getUniqueKeys(); + + return emptyList(); + } + private final List foreignKeys(Definition definition) { if (definition instanceof ForeignKeyDefinition) return matchers.getForeignKeys(); @@ -287,6 +294,30 @@ public class MatcherStrategy extends DefaultGeneratorStrategy { return result; } + for (MatchersPrimaryKeyType primaryKey : primaryKeys(definition)) { + String result = match(definition, primaryKey.getExpression(), primaryKey.getKeyIdentifier()); + if (result != null) + return result; + } + + for (MatchersUniqueKeyType uniqueKey : uniqueKeys(definition)) { + String result = match(definition, uniqueKey.getExpression(), uniqueKey.getKeyIdentifier()); + if (result != null) + return result; + } + + for (MatchersForeignKeyType foreignKey : foreignKeys(definition)) { + String result = match(definition, foreignKey.getExpression(), foreignKey.getKeyIdentifier()); + if (result != null) + return result; + } + + for (MatchersForeignKeyType foreignKey : inverseForeignKeys(definition)) { + String result = match(definition, foreignKey.getExpression(), foreignKey.getKeyIdentifier()); + if (result != null) + return result; + } + // Default to standard behaviour return super.getJavaIdentifier(definition); } @@ -325,21 +356,21 @@ public class MatcherStrategy extends DefaultGeneratorStrategy { } for (MatchersForeignKeyType foreignKeys : foreignKeys(definition)) { - String result = match(definition, foreignKeys.getExpression(), foreignKeys.getMethodName()); + String result = match(definition, foreignKeys.getExpression(), foreignKeys.getPathMethodName()); if (result != null) return result; } for (MatchersForeignKeyType inverseForeignKeys : inverseForeignKeys(definition)) { - String result = match(definition, inverseForeignKeys.getExpression(), inverseForeignKeys.getMethodNameInverse()); + String result = match(definition, inverseForeignKeys.getExpression(), inverseForeignKeys.getPathMethodNameInverse()); if (result != null) return result; } for (MatchersForeignKeyType manyToManyKeys : manyToManyKeys(definition)) { - String result = match(definition, manyToManyKeys.getExpression(), manyToManyKeys.getMethodNameManyToMany()); + String result = match(definition, manyToManyKeys.getExpression(), manyToManyKeys.getPathMethodNameManyToMany()); if (result != null) return result; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Matchers.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Matchers.java index 8c791b0771..cbeb7074a4 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Matchers.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Matchers.java @@ -25,6 +25,8 @@ import org.jooq.util.jaxb.tools.XMLBuilder; "catalogs", "schemas", "tables", + "primaryKeys", + "uniqueKeys", "foreignKeys", "fields", "routines", @@ -48,6 +50,12 @@ public class Matchers implements Serializable, XMLAppendable @XmlElementWrapper(name = "tables") @XmlElement(name = "table") protected List tables; + @XmlElementWrapper(name = "primaryKeys") + @XmlElement(name = "table") + protected List primaryKeys; + @XmlElementWrapper(name = "uniqueKeys") + @XmlElement(name = "table") + protected List uniqueKeys; @XmlElementWrapper(name = "foreignKeys") @XmlElement(name = "table") protected List foreignKeys; @@ -100,6 +108,28 @@ public class Matchers implements Serializable, XMLAppendable this.tables = tables; } + public List getPrimaryKeys() { + if (primaryKeys == null) { + primaryKeys = new ArrayList(); + } + return primaryKeys; + } + + public void setPrimaryKeys(List primaryKeys) { + this.primaryKeys = primaryKeys; + } + + public List getUniqueKeys() { + if (uniqueKeys == null) { + uniqueKeys = new ArrayList(); + } + return uniqueKeys; + } + + public void setUniqueKeys(List uniqueKeys) { + this.uniqueKeys = uniqueKeys; + } + public List getForeignKeys() { if (foreignKeys == null) { foreignKeys = new ArrayList(); @@ -229,6 +259,48 @@ public class Matchers implements Serializable, XMLAppendable return this; } + public Matchers withPrimaryKeys(MatchersPrimaryKeyType... values) { + if (values!= null) { + for (MatchersPrimaryKeyType value: values) { + getPrimaryKeys().add(value); + } + } + return this; + } + + public Matchers withPrimaryKeys(Collection values) { + if (values!= null) { + getPrimaryKeys().addAll(values); + } + return this; + } + + public Matchers withPrimaryKeys(List primaryKeys) { + setPrimaryKeys(primaryKeys); + return this; + } + + public Matchers withUniqueKeys(MatchersUniqueKeyType... values) { + if (values!= null) { + for (MatchersUniqueKeyType value: values) { + getUniqueKeys().add(value); + } + } + return this; + } + + public Matchers withUniqueKeys(Collection values) { + if (values!= null) { + getUniqueKeys().addAll(values); + } + return this; + } + + public Matchers withUniqueKeys(List uniqueKeys) { + setUniqueKeys(uniqueKeys); + return this; + } + public Matchers withForeignKeys(MatchersForeignKeyType... values) { if (values!= null) { for (MatchersForeignKeyType value: values) { @@ -360,6 +432,8 @@ public class Matchers implements Serializable, XMLAppendable builder.append("catalogs", "catalog", catalogs); builder.append("schemas", "schema", schemas); builder.append("tables", "table", tables); + builder.append("primaryKeys", "table", primaryKeys); + builder.append("uniqueKeys", "table", uniqueKeys); builder.append("foreignKeys", "table", foreignKeys); builder.append("fields", "field", fields); builder.append("routines", "routine", routines); @@ -414,6 +488,24 @@ public class Matchers implements Serializable, XMLAppendable return false; } } + if (primaryKeys == null) { + if (other.primaryKeys!= null) { + return false; + } + } else { + if (!primaryKeys.equals(other.primaryKeys)) { + return false; + } + } + if (uniqueKeys == null) { + if (other.uniqueKeys!= null) { + return false; + } + } else { + if (!uniqueKeys.equals(other.uniqueKeys)) { + return false; + } + } if (foreignKeys == null) { if (other.foreignKeys!= null) { return false; @@ -478,6 +570,8 @@ public class Matchers implements Serializable, XMLAppendable result = ((prime*result)+((catalogs == null)? 0 :catalogs.hashCode())); result = ((prime*result)+((schemas == null)? 0 :schemas.hashCode())); result = ((prime*result)+((tables == null)? 0 :tables.hashCode())); + result = ((prime*result)+((primaryKeys == null)? 0 :primaryKeys.hashCode())); + result = ((prime*result)+((uniqueKeys == null)? 0 :uniqueKeys.hashCode())); result = ((prime*result)+((foreignKeys == null)? 0 :foreignKeys.hashCode())); result = ((prime*result)+((fields == null)? 0 :fields.hashCode())); result = ((prime*result)+((routines == null)? 0 :routines.hashCode())); diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersForeignKeyType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersForeignKeyType.java index 50038254c9..74fe6dbc10 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersForeignKeyType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersForeignKeyType.java @@ -30,9 +30,10 @@ public class MatchersForeignKeyType implements Serializable, XMLAppendable private final static long serialVersionUID = 31900L; @XmlJavaTypeAdapter(StringAdapter.class) protected String expression; - protected MatcherRule methodName; - protected MatcherRule methodNameInverse; - protected MatcherRule methodNameManyToMany; + protected MatcherRule keyIdentifier; + protected MatcherRule pathMethodName; + protected MatcherRule pathMethodNameInverse; + protected MatcherRule pathMethodNameManyToMany; /** * This table matcher applies to all unqualified or qualified table names matched by this expression. If left empty, this matcher applies to all tables. @@ -51,51 +52,67 @@ public class MatchersForeignKeyType implements Serializable, XMLAppendable } /** - * This rule influences the naming of the generated to-one path join methods. + * This rule influences the naming of the generated key literal in the Keys class. * */ - public MatcherRule getMethodName() { - return methodName; + public MatcherRule getKeyIdentifier() { + return keyIdentifier; + } + + /** + * This rule influences the naming of the generated key literal in the Keys class. + * + */ + public void setKeyIdentifier(MatcherRule value) { + this.keyIdentifier = value; } /** * This rule influences the naming of the generated to-one path join methods. * */ - public void setMethodName(MatcherRule value) { - this.methodName = value; + public MatcherRule getPathMethodName() { + return pathMethodName; + } + + /** + * This rule influences the naming of the generated to-one path join methods. + * + */ + public void setPathMethodName(MatcherRule value) { + this.pathMethodName = value; } /** * This rule influences the naming of the generated to-many path join methods. * */ - public MatcherRule getMethodNameInverse() { - return methodNameInverse; + public MatcherRule getPathMethodNameInverse() { + return pathMethodNameInverse; } /** * This rule influences the naming of the generated to-many path join methods. * */ - public void setMethodNameInverse(MatcherRule value) { - this.methodNameInverse = value; + public void setPathMethodNameInverse(MatcherRule value) { + this.pathMethodNameInverse = value; } /** * This rule influences the naming of the generated many-to-many path join methods. * */ - public MatcherRule getMethodNameManyToMany() { - return methodNameManyToMany; + public MatcherRule getPathMethodNameManyToMany() { + return pathMethodNameManyToMany; } /** * This rule influences the naming of the generated many-to-many path join methods. * */ - public void setMethodNameManyToMany(MatcherRule value) { - this.methodNameManyToMany = value; + public void setPathMethodNameManyToMany(MatcherRule value) { + this.pathMethodNameManyToMany = value; } /** @@ -107,12 +124,21 @@ public class MatchersForeignKeyType implements Serializable, XMLAppendable return this; } + /** + * This rule influences the naming of the generated key literal in the Keys class. + * + */ + public MatchersForeignKeyType withKeyIdentifier(MatcherRule value) { + setKeyIdentifier(value); + return this; + } + /** * This rule influences the naming of the generated to-one path join methods. * */ - public MatchersForeignKeyType withMethodName(MatcherRule value) { - setMethodName(value); + public MatchersForeignKeyType withPathMethodName(MatcherRule value) { + setPathMethodName(value); return this; } @@ -120,8 +146,8 @@ public class MatchersForeignKeyType implements Serializable, XMLAppendable * This rule influences the naming of the generated to-many path join methods. * */ - public MatchersForeignKeyType withMethodNameInverse(MatcherRule value) { - setMethodNameInverse(value); + public MatchersForeignKeyType withPathMethodNameInverse(MatcherRule value) { + setPathMethodNameInverse(value); return this; } @@ -129,17 +155,18 @@ public class MatchersForeignKeyType implements Serializable, XMLAppendable * This rule influences the naming of the generated many-to-many path join methods. * */ - public MatchersForeignKeyType withMethodNameManyToMany(MatcherRule value) { - setMethodNameManyToMany(value); + public MatchersForeignKeyType withPathMethodNameManyToMany(MatcherRule value) { + setPathMethodNameManyToMany(value); return this; } @Override public final void appendTo(XMLBuilder builder) { builder.append("expression", expression); - builder.append("methodName", methodName); - builder.append("methodNameInverse", methodNameInverse); - builder.append("methodNameManyToMany", methodNameManyToMany); + builder.append("keyIdentifier", keyIdentifier); + builder.append("pathMethodName", pathMethodName); + builder.append("pathMethodNameInverse", pathMethodNameInverse); + builder.append("pathMethodNameManyToMany", pathMethodNameManyToMany); } @Override @@ -170,30 +197,39 @@ public class MatchersForeignKeyType implements Serializable, XMLAppendable return false; } } - if (methodName == null) { - if (other.methodName!= null) { + if (keyIdentifier == null) { + if (other.keyIdentifier!= null) { return false; } } else { - if (!methodName.equals(other.methodName)) { + if (!keyIdentifier.equals(other.keyIdentifier)) { return false; } } - if (methodNameInverse == null) { - if (other.methodNameInverse!= null) { + if (pathMethodName == null) { + if (other.pathMethodName!= null) { return false; } } else { - if (!methodNameInverse.equals(other.methodNameInverse)) { + if (!pathMethodName.equals(other.pathMethodName)) { return false; } } - if (methodNameManyToMany == null) { - if (other.methodNameManyToMany!= null) { + if (pathMethodNameInverse == null) { + if (other.pathMethodNameInverse!= null) { return false; } } else { - if (!methodNameManyToMany.equals(other.methodNameManyToMany)) { + if (!pathMethodNameInverse.equals(other.pathMethodNameInverse)) { + return false; + } + } + if (pathMethodNameManyToMany == null) { + if (other.pathMethodNameManyToMany!= null) { + return false; + } + } else { + if (!pathMethodNameManyToMany.equals(other.pathMethodNameManyToMany)) { return false; } } @@ -205,9 +241,10 @@ public class MatchersForeignKeyType implements Serializable, XMLAppendable final int prime = 31; int result = 1; result = ((prime*result)+((expression == null)? 0 :expression.hashCode())); - result = ((prime*result)+((methodName == null)? 0 :methodName.hashCode())); - result = ((prime*result)+((methodNameInverse == null)? 0 :methodNameInverse.hashCode())); - result = ((prime*result)+((methodNameManyToMany == null)? 0 :methodNameManyToMany.hashCode())); + result = ((prime*result)+((keyIdentifier == null)? 0 :keyIdentifier.hashCode())); + result = ((prime*result)+((pathMethodName == null)? 0 :pathMethodName.hashCode())); + result = ((prime*result)+((pathMethodNameInverse == null)? 0 :pathMethodNameInverse.hashCode())); + result = ((prime*result)+((pathMethodNameManyToMany == null)? 0 :pathMethodNameManyToMany.hashCode())); return result; } diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersPrimaryKeyType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersPrimaryKeyType.java new file mode 100644 index 0000000000..053d49772d --- /dev/null +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersPrimaryKeyType.java @@ -0,0 +1,140 @@ + +package org.jooq.meta.jaxb; + +import java.io.Serializable; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import org.jooq.util.jaxb.tools.StringAdapter; +import org.jooq.util.jaxb.tools.XMLAppendable; +import org.jooq.util.jaxb.tools.XMLBuilder; + + +/** + * Declarative naming strategy configuration for primary key names. + * + * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MatchersPrimaryKeyType", propOrder = { + +}) +@SuppressWarnings({ + "all" +}) +public class MatchersPrimaryKeyType implements Serializable, XMLAppendable +{ + + private final static long serialVersionUID = 31900L; + @XmlJavaTypeAdapter(StringAdapter.class) + protected String expression; + protected MatcherRule keyIdentifier; + + /** + * This table matcher applies to all unqualified or qualified table names matched by this expression. If left empty, this matcher applies to all tables. + * + */ + public String getExpression() { + return expression; + } + + /** + * This table matcher applies to all unqualified or qualified table names matched by this expression. If left empty, this matcher applies to all tables. + * + */ + public void setExpression(String value) { + this.expression = value; + } + + /** + * This rule influences the naming of the generated key literal in the Keys class. + * + */ + public MatcherRule getKeyIdentifier() { + return keyIdentifier; + } + + /** + * This rule influences the naming of the generated key literal in the Keys class. + * + */ + public void setKeyIdentifier(MatcherRule value) { + this.keyIdentifier = value; + } + + /** + * This table matcher applies to all unqualified or qualified table names matched by this expression. If left empty, this matcher applies to all tables. + * + */ + public MatchersPrimaryKeyType withExpression(String value) { + setExpression(value); + return this; + } + + /** + * This rule influences the naming of the generated key literal in the Keys class. + * + */ + public MatchersPrimaryKeyType withKeyIdentifier(MatcherRule value) { + setKeyIdentifier(value); + return this; + } + + @Override + public final void appendTo(XMLBuilder builder) { + builder.append("expression", expression); + builder.append("keyIdentifier", keyIdentifier); + } + + @Override + public String toString() { + XMLBuilder builder = XMLBuilder.nonFormatting(); + appendTo(builder); + return builder.toString(); + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass()!= that.getClass()) { + return false; + } + MatchersPrimaryKeyType other = ((MatchersPrimaryKeyType) that); + if (expression == null) { + if (other.expression!= null) { + return false; + } + } else { + if (!expression.equals(other.expression)) { + return false; + } + } + if (keyIdentifier == null) { + if (other.keyIdentifier!= null) { + return false; + } + } else { + if (!keyIdentifier.equals(other.keyIdentifier)) { + return false; + } + } + return true; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = ((prime*result)+((expression == null)? 0 :expression.hashCode())); + result = ((prime*result)+((keyIdentifier == null)? 0 :keyIdentifier.hashCode())); + return result; + } + +} diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersUniqueKeyType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersUniqueKeyType.java new file mode 100644 index 0000000000..254b3bf077 --- /dev/null +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersUniqueKeyType.java @@ -0,0 +1,140 @@ + +package org.jooq.meta.jaxb; + +import java.io.Serializable; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import org.jooq.util.jaxb.tools.StringAdapter; +import org.jooq.util.jaxb.tools.XMLAppendable; +import org.jooq.util.jaxb.tools.XMLBuilder; + + +/** + * Declarative naming strategy configuration for foreign key names. + * + * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MatchersUniqueKeyType", propOrder = { + +}) +@SuppressWarnings({ + "all" +}) +public class MatchersUniqueKeyType implements Serializable, XMLAppendable +{ + + private final static long serialVersionUID = 31900L; + @XmlJavaTypeAdapter(StringAdapter.class) + protected String expression; + protected MatcherRule keyIdentifier; + + /** + * This table matcher applies to all unqualified or qualified table names matched by this expression. If left empty, this matcher applies to all tables. + * + */ + public String getExpression() { + return expression; + } + + /** + * This table matcher applies to all unqualified or qualified table names matched by this expression. If left empty, this matcher applies to all tables. + * + */ + public void setExpression(String value) { + this.expression = value; + } + + /** + * This rule influences the naming of the generated key literal in the Keys class. + * + */ + public MatcherRule getKeyIdentifier() { + return keyIdentifier; + } + + /** + * This rule influences the naming of the generated key literal in the Keys class. + * + */ + public void setKeyIdentifier(MatcherRule value) { + this.keyIdentifier = value; + } + + /** + * This table matcher applies to all unqualified or qualified table names matched by this expression. If left empty, this matcher applies to all tables. + * + */ + public MatchersUniqueKeyType withExpression(String value) { + setExpression(value); + return this; + } + + /** + * This rule influences the naming of the generated key literal in the Keys class. + * + */ + public MatchersUniqueKeyType withKeyIdentifier(MatcherRule value) { + setKeyIdentifier(value); + return this; + } + + @Override + public final void appendTo(XMLBuilder builder) { + builder.append("expression", expression); + builder.append("keyIdentifier", keyIdentifier); + } + + @Override + public String toString() { + XMLBuilder builder = XMLBuilder.nonFormatting(); + appendTo(builder); + return builder.toString(); + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass()!= that.getClass()) { + return false; + } + MatchersUniqueKeyType other = ((MatchersUniqueKeyType) that); + if (expression == null) { + if (other.expression!= null) { + return false; + } + } else { + if (!expression.equals(other.expression)) { + return false; + } + } + if (keyIdentifier == null) { + if (other.keyIdentifier!= null) { + return false; + } + } else { + if (!keyIdentifier.equals(other.keyIdentifier)) { + return false; + } + } + return true; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = ((prime*result)+((expression == null)? 0 :expression.hashCode())); + result = ((prime*result)+((keyIdentifier == null)? 0 :keyIdentifier.hashCode())); + return result; + } + +} diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/ObjectFactory.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/ObjectFactory.java index 8e67ca6e7f..d24c54686a 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/ObjectFactory.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/ObjectFactory.java @@ -101,6 +101,22 @@ public class ObjectFactory { return new MatchersTableType(); } + /** + * Create an instance of {@link MatchersPrimaryKeyType } + * + */ + public MatchersPrimaryKeyType createMatchersPrimaryKeyType() { + return new MatchersPrimaryKeyType(); + } + + /** + * Create an instance of {@link MatchersUniqueKeyType } + * + */ + public MatchersUniqueKeyType createMatchersUniqueKeyType() { + return new MatchersUniqueKeyType(); + } + /** * Create an instance of {@link MatchersForeignKeyType } * diff --git a/jOOQ-meta/src/main/resources/org/jooq/meta/xsd/jooq-codegen-3.19.0.xsd b/jOOQ-meta/src/main/resources/org/jooq/meta/xsd/jooq-codegen-3.19.0.xsd index f70f7ebfd5..dbfd30aadb 100644 --- a/jOOQ-meta/src/main/resources/org/jooq/meta/xsd/jooq-codegen-3.19.0.xsd +++ b/jOOQ-meta/src/main/resources/org/jooq/meta/xsd/jooq-codegen-3.19.0.xsd @@ -183,6 +183,14 @@ + + + + + + + + @@ -378,28 +386,70 @@ and follow its (undocumented!) assumptions (e.g. constructors, etc.). Use this a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - +