Class JdbcIndex
java.lang.Object
com.northconcepts.datapipeline.foundations.core.Bean
com.northconcepts.datapipeline.foundations.jdbc.JdbcIndex
- All Implemented Interfaces:
DataExceptionContributor,JsonSerializable,RecordSerializable,XmlSerializable,Serializable
Metadata for a table index and its columns, as reported by JDBC
DatabaseMetaData.getIndexInfo.- See Also:
-
Field Summary
Fields inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
SERIALIZED_CLASS_NAME, TYPEFields inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
XML_SERIALIZED_CLASS_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFieldIndex(JdbcFieldIndex jdbcFieldIndex) fromRecord(Record source) Loads this instance's state from a record and returnsthis(for fluid API call chaining).longReturns the number of unique values in the index, or of rows in the table for atableIndexStatisticentry.Returns the index catalog (JDBCINDEX_QUALIFIER), or null.booleanIndicates if the index allows duplicate values (it is not a unique index).longgetPages()Returns the number of pages the index uses, or the table uses for atableIndexStatisticentry.getTable()Returns the table this index was added to, or null.intgetType()Returns the index type as aDatabaseMetaDatacode:tableIndexStatistic,tableIndexClustered,tableIndexHashedortableIndexOther.voidsetCardinality(long cardinality) Sets the number of unique values in the index, or of rows in the table for atableIndexStatisticentry.voidsetFieldIndexes(List<JdbcFieldIndex> fieldIndexes) voidsetFilterCondition(String filterCondition) voidsetIndexName(String indexName) voidsetIndexQualifier(String indexQualifier) Sets the index catalog (JDBCINDEX_QUALIFIER).voidsetNonUnique(boolean nonUnique) Indicates if the index allows duplicate values (it is not a unique index).voidsetPages(long pages) Sets the number of pages the index uses, or the table uses for atableIndexStatisticentry.protected JdbcIndexSets the table this index belongs to; called byJdbcTable.addIndex(JdbcIndex).voidsetType(int type) Sets the index type as aDatabaseMetaDatacode:tableIndexStatistic,tableIndexClustered,tableIndexHashedortableIndexOther.toRecord()Converts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.Methods inherited from class com.northconcepts.datapipeline.foundations.core.Bean
addExceptionProperties, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.northconcepts.datapipeline.core.DataExceptionContributor
addExceptionProperties, exception, exception, exceptionMethods inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
fromJson, fromJson, toJson, toJson, toJsonMethods inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
fromXml, fromXml, fromXmlElement, toXml, toXml, toXml, toXml, toXml, toXmlElement
-
Constructor Details
-
JdbcIndex
public JdbcIndex()
-
-
Method Details
-
getTable
Returns the table this index was added to, or null. -
setTable
Sets the table this index belongs to; called byJdbcTable.addIndex(JdbcIndex). -
getIndexName
-
setIndexName
-
getNonUnique
public boolean getNonUnique()Indicates if the index allows duplicate values (it is not a unique index). -
setNonUnique
public void setNonUnique(boolean nonUnique) Indicates if the index allows duplicate values (it is not a unique index). -
getPages
public long getPages()Returns the number of pages the index uses, or the table uses for atableIndexStatisticentry. -
setPages
public void setPages(long pages) Sets the number of pages the index uses, or the table uses for atableIndexStatisticentry. -
getCardinality
public long getCardinality()Returns the number of unique values in the index, or of rows in the table for atableIndexStatisticentry. -
setCardinality
public void setCardinality(long cardinality) Sets the number of unique values in the index, or of rows in the table for atableIndexStatisticentry. -
getFilterCondition
-
setFilterCondition
-
getIndexQualifier
Returns the index catalog (JDBCINDEX_QUALIFIER), or null. -
setIndexQualifier
Sets the index catalog (JDBCINDEX_QUALIFIER). -
getType
public int getType()Returns the index type as aDatabaseMetaDatacode:tableIndexStatistic,tableIndexClustered,tableIndexHashedortableIndexOther. -
setType
public void setType(int type) Sets the index type as aDatabaseMetaDatacode:tableIndexStatistic,tableIndexClustered,tableIndexHashedortableIndexOther. -
getFieldIndexes
-
setFieldIndexes
-
addFieldIndex
-
toRecord
Description copied from interface:RecordSerializableConverts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.- Specified by:
toRecordin interfaceRecordSerializable- Overrides:
toRecordin classBean
-
fromRecord
Description copied from interface:RecordSerializableLoads this instance's state from a record and returnsthis(for fluid API call chaining). For fluid API call chaining, the overridden method should change the declared return type to its class.- Specified by:
fromRecordin interfaceRecordSerializable- Overrides:
fromRecordin classBean- Parameters:
source-- Returns:
- this instance.
-