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 308fd7b9c6..6a3e77b38c 100644 --- a/jOOQ-codegen/src/main/java/org/jooq/codegen/MatcherStrategy.java +++ b/jOOQ-codegen/src/main/java/org/jooq/codegen/MatcherStrategy.java @@ -369,10 +369,11 @@ public class MatcherStrategy extends DefaultGeneratorStrategy { String result = null; switch (mode) { - case POJO: result = match(definition, tables.getExpression(), tables.getPojoExtends()); break; - case RECORD: result = match(definition, tables.getExpression(), tables.getRecordExtends()); break; - case DAO: result = match(definition, tables.getExpression(), tables.getDaoExtends()); break; - case DEFAULT: result = match(definition, tables.getExpression(), tables.getTableExtends()); break; + case POJO: result = match(definition, tables.getExpression(), tables.getPojoExtends()); break; + case RECORD: result = match(definition, tables.getExpression(), tables.getRecordExtends()); break; + case DAO: result = match(definition, tables.getExpression(), tables.getDaoExtends()); break; + case PATH: result = match(definition, tables.getExpression(), tables.getPathExtends()); break; + case DEFAULT: result = match(definition, tables.getExpression(), tables.getTableExtends()); break; } if (result != null) @@ -427,6 +428,7 @@ public class MatcherStrategy extends DefaultGeneratorStrategy { case INTERFACE: result = match(definition, tables.getExpression(), tables.getInterfaceImplements()); break; case POJO: result = match(definition, tables.getExpression(), tables.getPojoImplements()); break; case RECORD: result = match(definition, tables.getExpression(), tables.getRecordImplements()); break; + case PATH: result = match(definition, tables.getExpression(), tables.getTableImplements()); break; } if (result != null) diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersTableType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersTableType.java index e6a6be6a84..432d51a268 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersTableType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersTableType.java @@ -37,6 +37,8 @@ public class MatchersTableType implements Serializable, XMLAppendable @XmlJavaTypeAdapter(StringAdapter.class) protected String tableImplements; protected MatcherRule pathClass; + protected MatcherRule pathExtends; + protected MatcherRule pathImplements; protected MatcherRule recordClass; @XmlJavaTypeAdapter(StringAdapter.class) protected String recordExtends; @@ -160,6 +162,38 @@ public class MatchersTableType implements Serializable, XMLAppendable this.pathClass = value; } + /** + * This string provides a super class that a generated {@link org.jooq.Table} and {@link org.jooq.Path} object should extend. + * + */ + public MatcherRule getPathExtends() { + return pathExtends; + } + + /** + * This string provides a super class that a generated {@link org.jooq.Table} and {@link org.jooq.Path} object should extend. + * + */ + public void setPathExtends(MatcherRule value) { + this.pathExtends = value; + } + + /** + * This string provides additional interfaces that a generated {@link org.jooq.Table} and {@link org.jooq.Path} object should implement. + * + */ + public MatcherRule getPathImplements() { + return pathImplements; + } + + /** + * This string provides additional interfaces that a generated {@link org.jooq.Table} and {@link org.jooq.Path} object should implement. + * + */ + public void setPathImplements(MatcherRule value) { + this.pathImplements = value; + } + /** * This rule influences the naming of the generated {@link org.jooq.TableRecord} object. * @@ -410,6 +444,24 @@ public class MatchersTableType implements Serializable, XMLAppendable return this; } + /** + * This string provides a super class that a generated {@link org.jooq.Table} and {@link org.jooq.Path} object should extend. + * + */ + public MatchersTableType withPathExtends(MatcherRule value) { + setPathExtends(value); + return this; + } + + /** + * This string provides additional interfaces that a generated {@link org.jooq.Table} and {@link org.jooq.Path} object should implement. + * + */ + public MatchersTableType withPathImplements(MatcherRule value) { + setPathImplements(value); + return this; + } + /** * This rule influences the naming of the generated {@link org.jooq.TableRecord} object. * @@ -525,6 +577,8 @@ public class MatchersTableType implements Serializable, XMLAppendable builder.append("tableExtends", tableExtends); builder.append("tableImplements", tableImplements); builder.append("pathClass", pathClass); + builder.append("pathExtends", pathExtends); + builder.append("pathImplements", pathImplements); builder.append("recordClass", recordClass); builder.append("recordExtends", recordExtends); builder.append("recordImplements", recordImplements); @@ -611,6 +665,24 @@ public class MatchersTableType implements Serializable, XMLAppendable return false; } } + if (pathExtends == null) { + if (other.pathExtends!= null) { + return false; + } + } else { + if (!pathExtends.equals(other.pathExtends)) { + return false; + } + } + if (pathImplements == null) { + if (other.pathImplements!= null) { + return false; + } + } else { + if (!pathImplements.equals(other.pathImplements)) { + return false; + } + } if (recordClass == null) { if (other.recordClass!= null) { return false; @@ -723,6 +795,8 @@ public class MatchersTableType implements Serializable, XMLAppendable result = ((prime*result)+((tableExtends == null)? 0 :tableExtends.hashCode())); result = ((prime*result)+((tableImplements == null)? 0 :tableImplements.hashCode())); result = ((prime*result)+((pathClass == null)? 0 :pathClass.hashCode())); + result = ((prime*result)+((pathExtends == null)? 0 :pathExtends.hashCode())); + result = ((prime*result)+((pathImplements == null)? 0 :pathImplements.hashCode())); result = ((prime*result)+((recordClass == null)? 0 :recordClass.hashCode())); result = ((prime*result)+((recordExtends == null)? 0 :recordExtends.hashCode())); result = ((prime*result)+((recordImplements == null)? 0 :recordImplements.hashCode())); 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 a1d732b23a..f70f7ebfd5 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 @@ -316,6 +316,14 @@ and follow its (undocumented!) assumptions (e.g. constructors, etc.). Use this a + + + + + + + +