[#6319] Add INDEXES and INDEX_COLUMN_USAGES views to jooq-meta.xsd

This commit is contained in:
lukaseder 2017-06-05 15:09:03 +02:00
parent ef55ac7436
commit d939b1cb61
6 changed files with 757 additions and 0 deletions

View File

@ -29,6 +29,12 @@
<bindings if-exists="true" scd="~tns:ReferentialConstraints">
<class ref="org.jooq.util.xml.jaxb.ReferentialConstraints"/>
</bindings>
<bindings if-exists="true" scd="~tns:Indexes">
<class ref="org.jooq.util.xml.jaxb.Indexes"/>
</bindings>
<bindings if-exists="true" scd="~tns:IndexColumnUsages">
<class ref="org.jooq.util.xml.jaxb.IndexColumnUsages"/>
</bindings>
<bindings if-exists="true" scd="~tns:Routines">
<class ref="org.jooq.util.xml.jaxb.Routines"/>
</bindings>
@ -56,6 +62,12 @@
<bindings if-exists="true" scd="~tns:ReferentialConstraint">
<class ref="org.jooq.util.xml.jaxb.ReferentialConstraint"/>
</bindings>
<bindings if-exists="true" scd="~tns:Index">
<class ref="org.jooq.util.xml.jaxb.Index"/>
</bindings>
<bindings if-exists="true" scd="~tns:IndexColumnUsage">
<class ref="org.jooq.util.xml.jaxb.IndexColumnUsage"/>
</bindings>
<bindings if-exists="true" scd="~tns:Routine">
<class ref="org.jooq.util.xml.jaxb.Routine"/>
</bindings>

View File

@ -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;
/**
* <p>Java class for Index complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="Index"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;all&gt;
* &lt;element name="index_catalog" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="index_schema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="index_name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="table_catalog" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="table_schema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="table_name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="is_unique" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/&gt;
* &lt;/all&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@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;
}
}

View File

@ -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;
/**
* <p>Java class for IndexColumnUsage complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="IndexColumnUsage"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;all&gt;
* &lt;element name="index_catalog" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="index_schema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="index_name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="table_catalog" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="table_schema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="table_name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="column_name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="ordinal_position" type="{http://www.w3.org/2001/XMLSchema}int"/&gt;
* &lt;element name="is_descending" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/&gt;
* &lt;/all&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@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;
}
}

View File

@ -37,6 +37,8 @@ import javax.xml.bind.annotation.XmlType;
* &lt;element name="table_constraints" type="{http://www.jooq.org/xsd/jooq-meta-3.10.0.xsd}TableConstraints" minOccurs="0"/&gt;
* &lt;element name="key_column_usages" type="{http://www.jooq.org/xsd/jooq-meta-3.10.0.xsd}KeyColumnUsages" minOccurs="0"/&gt;
* &lt;element name="referential_constraints" type="{http://www.jooq.org/xsd/jooq-meta-3.10.0.xsd}ReferentialConstraints" minOccurs="0"/&gt;
* &lt;element name="indexes" type="{http://www.jooq.org/xsd/jooq-meta-3.10.0.xsd}Indexes" minOccurs="0"/&gt;
* &lt;element name="index_column_usages" type="{http://www.jooq.org/xsd/jooq-meta-3.10.0.xsd}IndexColumnUsages" minOccurs="0"/&gt;
* &lt;element name="routines" type="{http://www.jooq.org/xsd/jooq-meta-3.10.0.xsd}Routines" minOccurs="0"/&gt;
* &lt;element name="parameters" type="{http://www.jooq.org/xsd/jooq-meta-3.10.0.xsd}Parameters" minOccurs="0"/&gt;
* &lt;/all&gt;
@ -80,6 +82,12 @@ public class InformationSchema implements Serializable
@XmlElementWrapper(name = "referential_constraints")
@XmlElement(name = "referential_constraint")
protected List<ReferentialConstraint> referentialConstraints;
@XmlElementWrapper(name = "indexes")
@XmlElement(name = "index")
protected List<Index> indexes;
@XmlElementWrapper(name = "index_column_usages")
@XmlElement(name = "index_column_usage")
protected List<IndexColumnUsage> indexColumnUsages;
@XmlElementWrapper(name = "routines")
@XmlElement(name = "routine")
protected List<Routine> routines;
@ -164,6 +172,28 @@ public class InformationSchema implements Serializable
this.referentialConstraints = referentialConstraints;
}
public List<Index> getIndexes() {
if (indexes == null) {
indexes = new ArrayList<Index>();
}
return indexes;
}
public void setIndexes(List<Index> indexes) {
this.indexes = indexes;
}
public List<IndexColumnUsage> getIndexColumnUsages() {
if (indexColumnUsages == null) {
indexColumnUsages = new ArrayList<IndexColumnUsage>();
}
return indexColumnUsages;
}
public void setIndexColumnUsages(List<IndexColumnUsage> indexColumnUsages) {
this.indexColumnUsages = indexColumnUsages;
}
public List<Routine> getRoutines() {
if (routines == null) {
routines = new ArrayList<Routine>();
@ -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<Index> values) {
if (values!= null) {
getIndexes().addAll(values);
}
return this;
}
public InformationSchema withIndexes(List<Index> 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<IndexColumnUsage> values) {
if (values!= null) {
getIndexColumnUsages().addAll(values);
}
return this;
}
public InformationSchema withIndexColumnUsages(List<IndexColumnUsage> indexColumnUsages) {
setIndexColumnUsages(indexColumnUsages);
return this;
}
public InformationSchema withRoutines(Routine... values) {
if (values!= null) {
for (Routine value: values) {

View File

@ -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 }
*

View File

@ -14,6 +14,8 @@
<element name="table_constraints" type="tns:TableConstraints" minOccurs="0" maxOccurs="1" />
<element name="key_column_usages" type="tns:KeyColumnUsages" minOccurs="0" maxOccurs="1" />
<element name="referential_constraints" type="tns:ReferentialConstraints" minOccurs="0" maxOccurs="1" />
<element name="indexes" type="tns:Indexes" minOccurs="0" maxOccurs="1" />
<element name="index_column_usages" type="tns:IndexColumnUsages" minOccurs="0" maxOccurs="1" />
<element name="routines" type="tns:Routines" minOccurs="0" maxOccurs="1" />
<element name="parameters" type="tns:Parameters" minOccurs="0" maxOccurs="1" />
</all>
@ -151,6 +153,44 @@
</all>
</complexType>
<complexType name="Indexes">
<sequence>
<element name="index" type="tns:Index" minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="Index">
<all>
<element name="index_catalog" type="string" minOccurs="0" maxOccurs="1" />
<element name="index_schema" type="string" minOccurs="0" maxOccurs="1" />
<element name="index_name" type="string" minOccurs="1" maxOccurs="1" />
<element name="table_catalog" type="string" minOccurs="0" maxOccurs="1" />
<element name="table_schema" type="string" minOccurs="0" maxOccurs="1" />
<element name="table_name" type="string" minOccurs="1" maxOccurs="1" />
<element name="is_unique" type="boolean" minOccurs="0" maxOccurs="1" />
</all>
</complexType>
<complexType name="IndexColumnUsages">
<sequence>
<element name="index_column_usage" type="tns:IndexColumnUsage" minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="IndexColumnUsage">
<all>
<element name="index_catalog" type="string" minOccurs="0" maxOccurs="1" />
<element name="index_schema" type="string" minOccurs="0" maxOccurs="1" />
<element name="index_name" type="string" minOccurs="1" maxOccurs="1" />
<element name="table_catalog" type="string" minOccurs="0" maxOccurs="1" />
<element name="table_schema" type="string" minOccurs="0" maxOccurs="1" />
<element name="table_name" type="string" minOccurs="1" maxOccurs="1" />
<element name="column_name" type="string" minOccurs="1" maxOccurs="1" />
<element name="ordinal_position" type="int" minOccurs="1" maxOccurs="1" />
<element name="is_descending" type="boolean" minOccurs="0" maxOccurs="1"/>
</all>
</complexType>
<complexType name="Routines">
<sequence>
<element name="routine" type="tns:Routine" minOccurs="0" maxOccurs="unbounded" />