diff --git a/jOOQ/src/main/java/META-INF/sun-jaxb.episode b/jOOQ/src/main/java/META-INF/sun-jaxb.episode index c1a8b748f2..683940ab3f 100644 --- a/jOOQ/src/main/java/META-INF/sun-jaxb.episode +++ b/jOOQ/src/main/java/META-INF/sun-jaxb.episode @@ -29,6 +29,12 @@ + + + + + + @@ -56,6 +62,12 @@ + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/util/xml/jaxb/Index.java b/jOOQ/src/main/java/org/jooq/util/xml/jaxb/Index.java new file mode 100644 index 0000000000..a98bc7a46f --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/util/xml/jaxb/Index.java @@ -0,0 +1,280 @@ + + + + + + + + +package org.jooq.util.xml.jaxb; + +import java.io.Serializable; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import org.jooq.util.jaxb.tools.StringAdapter; + + +/** + *

Java class for Index complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="Index">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <all>
+ *         <element name="index_catalog" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="index_schema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="index_name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="table_catalog" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="table_schema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="table_name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="is_unique" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *       </all>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Index", propOrder = { + +}) +@SuppressWarnings({ + "all" +}) +public class Index implements Serializable +{ + + private final static long serialVersionUID = 31000L; + @XmlElement(name = "index_catalog") + @XmlJavaTypeAdapter(StringAdapter.class) + protected String indexCatalog; + @XmlElement(name = "index_schema") + @XmlJavaTypeAdapter(StringAdapter.class) + protected String indexSchema; + @XmlElement(name = "index_name", required = true) + @XmlJavaTypeAdapter(StringAdapter.class) + protected String indexName; + @XmlElement(name = "table_catalog") + @XmlJavaTypeAdapter(StringAdapter.class) + protected String tableCatalog; + @XmlElement(name = "table_schema") + @XmlJavaTypeAdapter(StringAdapter.class) + protected String tableSchema; + @XmlElement(name = "table_name", required = true) + @XmlJavaTypeAdapter(StringAdapter.class) + protected String tableName; + @XmlElement(name = "is_unique") + protected Boolean isUnique; + + /** + * Gets the value of the indexCatalog property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIndexCatalog() { + return indexCatalog; + } + + /** + * Sets the value of the indexCatalog property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIndexCatalog(String value) { + this.indexCatalog = value; + } + + /** + * Gets the value of the indexSchema property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIndexSchema() { + return indexSchema; + } + + /** + * Sets the value of the indexSchema property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIndexSchema(String value) { + this.indexSchema = value; + } + + /** + * Gets the value of the indexName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIndexName() { + return indexName; + } + + /** + * Sets the value of the indexName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIndexName(String value) { + this.indexName = value; + } + + /** + * Gets the value of the tableCatalog property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTableCatalog() { + return tableCatalog; + } + + /** + * Sets the value of the tableCatalog property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTableCatalog(String value) { + this.tableCatalog = value; + } + + /** + * Gets the value of the tableSchema property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTableSchema() { + return tableSchema; + } + + /** + * Sets the value of the tableSchema property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTableSchema(String value) { + this.tableSchema = value; + } + + /** + * Gets the value of the tableName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTableName() { + return tableName; + } + + /** + * Sets the value of the tableName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTableName(String value) { + this.tableName = value; + } + + /** + * Gets the value of the isUnique property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isIsUnique() { + return isUnique; + } + + /** + * Sets the value of the isUnique property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setIsUnique(Boolean value) { + this.isUnique = value; + } + + public Index withIndexCatalog(String value) { + setIndexCatalog(value); + return this; + } + + public Index withIndexSchema(String value) { + setIndexSchema(value); + return this; + } + + public Index withIndexName(String value) { + setIndexName(value); + return this; + } + + public Index withTableCatalog(String value) { + setTableCatalog(value); + return this; + } + + public Index withTableSchema(String value) { + setTableSchema(value); + return this; + } + + public Index withTableName(String value) { + setTableName(value); + return this; + } + + public Index withIsUnique(Boolean value) { + setIsUnique(value); + return this; + } + +} diff --git a/jOOQ/src/main/java/org/jooq/util/xml/jaxb/IndexColumnUsage.java b/jOOQ/src/main/java/org/jooq/util/xml/jaxb/IndexColumnUsage.java new file mode 100644 index 0000000000..5138c6894b --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/util/xml/jaxb/IndexColumnUsage.java @@ -0,0 +1,337 @@ + + + + + + + + +package org.jooq.util.xml.jaxb; + +import java.io.Serializable; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import org.jooq.util.jaxb.tools.StringAdapter; + + +/** + *

Java class for IndexColumnUsage complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="IndexColumnUsage">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <all>
+ *         <element name="index_catalog" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="index_schema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="index_name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="table_catalog" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="table_schema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="table_name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="column_name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="ordinal_position" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="is_descending" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *       </all>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "IndexColumnUsage", propOrder = { + +}) +@SuppressWarnings({ + "all" +}) +public class IndexColumnUsage implements Serializable +{ + + private final static long serialVersionUID = 31000L; + @XmlElement(name = "index_catalog") + @XmlJavaTypeAdapter(StringAdapter.class) + protected String indexCatalog; + @XmlElement(name = "index_schema") + @XmlJavaTypeAdapter(StringAdapter.class) + protected String indexSchema; + @XmlElement(name = "index_name", required = true) + @XmlJavaTypeAdapter(StringAdapter.class) + protected String indexName; + @XmlElement(name = "table_catalog") + @XmlJavaTypeAdapter(StringAdapter.class) + protected String tableCatalog; + @XmlElement(name = "table_schema") + @XmlJavaTypeAdapter(StringAdapter.class) + protected String tableSchema; + @XmlElement(name = "table_name", required = true) + @XmlJavaTypeAdapter(StringAdapter.class) + protected String tableName; + @XmlElement(name = "column_name", required = true) + @XmlJavaTypeAdapter(StringAdapter.class) + protected String columnName; + @XmlElement(name = "ordinal_position") + protected int ordinalPosition; + @XmlElement(name = "is_descending") + protected Boolean isDescending; + + /** + * Gets the value of the indexCatalog property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIndexCatalog() { + return indexCatalog; + } + + /** + * Sets the value of the indexCatalog property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIndexCatalog(String value) { + this.indexCatalog = value; + } + + /** + * Gets the value of the indexSchema property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIndexSchema() { + return indexSchema; + } + + /** + * Sets the value of the indexSchema property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIndexSchema(String value) { + this.indexSchema = value; + } + + /** + * Gets the value of the indexName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIndexName() { + return indexName; + } + + /** + * Sets the value of the indexName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIndexName(String value) { + this.indexName = value; + } + + /** + * Gets the value of the tableCatalog property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTableCatalog() { + return tableCatalog; + } + + /** + * Sets the value of the tableCatalog property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTableCatalog(String value) { + this.tableCatalog = value; + } + + /** + * Gets the value of the tableSchema property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTableSchema() { + return tableSchema; + } + + /** + * Sets the value of the tableSchema property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTableSchema(String value) { + this.tableSchema = value; + } + + /** + * Gets the value of the tableName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTableName() { + return tableName; + } + + /** + * Sets the value of the tableName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTableName(String value) { + this.tableName = value; + } + + /** + * Gets the value of the columnName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getColumnName() { + return columnName; + } + + /** + * Sets the value of the columnName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setColumnName(String value) { + this.columnName = value; + } + + /** + * Gets the value of the ordinalPosition property. + * + */ + public int getOrdinalPosition() { + return ordinalPosition; + } + + /** + * Sets the value of the ordinalPosition property. + * + */ + public void setOrdinalPosition(int value) { + this.ordinalPosition = value; + } + + /** + * Gets the value of the isDescending property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isIsDescending() { + return isDescending; + } + + /** + * Sets the value of the isDescending property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setIsDescending(Boolean value) { + this.isDescending = value; + } + + public IndexColumnUsage withIndexCatalog(String value) { + setIndexCatalog(value); + return this; + } + + public IndexColumnUsage withIndexSchema(String value) { + setIndexSchema(value); + return this; + } + + public IndexColumnUsage withIndexName(String value) { + setIndexName(value); + return this; + } + + public IndexColumnUsage withTableCatalog(String value) { + setTableCatalog(value); + return this; + } + + public IndexColumnUsage withTableSchema(String value) { + setTableSchema(value); + return this; + } + + public IndexColumnUsage withTableName(String value) { + setTableName(value); + return this; + } + + public IndexColumnUsage withColumnName(String value) { + setColumnName(value); + return this; + } + + public IndexColumnUsage withOrdinalPosition(int value) { + setOrdinalPosition(value); + return this; + } + + public IndexColumnUsage withIsDescending(Boolean value) { + setIsDescending(value); + return this; + } + +} diff --git a/jOOQ/src/main/java/org/jooq/util/xml/jaxb/InformationSchema.java b/jOOQ/src/main/java/org/jooq/util/xml/jaxb/InformationSchema.java index 04a0850fe6..45aa28f2a4 100644 --- a/jOOQ/src/main/java/org/jooq/util/xml/jaxb/InformationSchema.java +++ b/jOOQ/src/main/java/org/jooq/util/xml/jaxb/InformationSchema.java @@ -37,6 +37,8 @@ import javax.xml.bind.annotation.XmlType; * <element name="table_constraints" type="{http://www.jooq.org/xsd/jooq-meta-3.10.0.xsd}TableConstraints" minOccurs="0"/> * <element name="key_column_usages" type="{http://www.jooq.org/xsd/jooq-meta-3.10.0.xsd}KeyColumnUsages" minOccurs="0"/> * <element name="referential_constraints" type="{http://www.jooq.org/xsd/jooq-meta-3.10.0.xsd}ReferentialConstraints" minOccurs="0"/> + * <element name="indexes" type="{http://www.jooq.org/xsd/jooq-meta-3.10.0.xsd}Indexes" minOccurs="0"/> + * <element name="index_column_usages" type="{http://www.jooq.org/xsd/jooq-meta-3.10.0.xsd}IndexColumnUsages" minOccurs="0"/> * <element name="routines" type="{http://www.jooq.org/xsd/jooq-meta-3.10.0.xsd}Routines" minOccurs="0"/> * <element name="parameters" type="{http://www.jooq.org/xsd/jooq-meta-3.10.0.xsd}Parameters" minOccurs="0"/> * </all> @@ -80,6 +82,12 @@ public class InformationSchema implements Serializable @XmlElementWrapper(name = "referential_constraints") @XmlElement(name = "referential_constraint") protected List referentialConstraints; + @XmlElementWrapper(name = "indexes") + @XmlElement(name = "index") + protected List indexes; + @XmlElementWrapper(name = "index_column_usages") + @XmlElement(name = "index_column_usage") + protected List indexColumnUsages; @XmlElementWrapper(name = "routines") @XmlElement(name = "routine") protected List routines; @@ -164,6 +172,28 @@ public class InformationSchema implements Serializable this.referentialConstraints = referentialConstraints; } + public List getIndexes() { + if (indexes == null) { + indexes = new ArrayList(); + } + return indexes; + } + + public void setIndexes(List indexes) { + this.indexes = indexes; + } + + public List getIndexColumnUsages() { + if (indexColumnUsages == null) { + indexColumnUsages = new ArrayList(); + } + return indexColumnUsages; + } + + public void setIndexColumnUsages(List indexColumnUsages) { + this.indexColumnUsages = indexColumnUsages; + } + public List getRoutines() { if (routines == null) { routines = new ArrayList(); @@ -333,6 +363,48 @@ public class InformationSchema implements Serializable return this; } + public InformationSchema withIndexes(Index... values) { + if (values!= null) { + for (Index value: values) { + getIndexes().add(value); + } + } + return this; + } + + public InformationSchema withIndexes(Collection values) { + if (values!= null) { + getIndexes().addAll(values); + } + return this; + } + + public InformationSchema withIndexes(List indexes) { + setIndexes(indexes); + return this; + } + + public InformationSchema withIndexColumnUsages(IndexColumnUsage... values) { + if (values!= null) { + for (IndexColumnUsage value: values) { + getIndexColumnUsages().add(value); + } + } + return this; + } + + public InformationSchema withIndexColumnUsages(Collection values) { + if (values!= null) { + getIndexColumnUsages().addAll(values); + } + return this; + } + + public InformationSchema withIndexColumnUsages(List indexColumnUsages) { + setIndexColumnUsages(indexColumnUsages); + return this; + } + public InformationSchema withRoutines(Routine... values) { if (values!= null) { for (Routine value: values) { diff --git a/jOOQ/src/main/java/org/jooq/util/xml/jaxb/ObjectFactory.java b/jOOQ/src/main/java/org/jooq/util/xml/jaxb/ObjectFactory.java index 3c73ed9ccb..dc82f9ab48 100644 --- a/jOOQ/src/main/java/org/jooq/util/xml/jaxb/ObjectFactory.java +++ b/jOOQ/src/main/java/org/jooq/util/xml/jaxb/ObjectFactory.java @@ -100,6 +100,22 @@ public class ObjectFactory { return new ReferentialConstraint(); } + /** + * Create an instance of {@link Index } + * + */ + public Index createIndex() { + return new Index(); + } + + /** + * Create an instance of {@link IndexColumnUsage } + * + */ + public IndexColumnUsage createIndexColumnUsage() { + return new IndexColumnUsage(); + } + /** * Create an instance of {@link Routine } * diff --git a/jOOQ/src/main/resources/xsd/jooq-meta-3.10.0.xsd b/jOOQ/src/main/resources/xsd/jooq-meta-3.10.0.xsd index 92caef5af2..e86a7f8b4c 100644 --- a/jOOQ/src/main/resources/xsd/jooq-meta-3.10.0.xsd +++ b/jOOQ/src/main/resources/xsd/jooq-meta-3.10.0.xsd @@ -14,6 +14,8 @@ + + @@ -151,6 +153,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +