java.lang.Object
com.northconcepts.datapipeline.foundations.core.Bean
com.northconcepts.datapipeline.foundations.jdbc.JdbcIndex
All Implemented Interfaces:
DataExceptionContributor, JsonSerializable, RecordSerializable, XmlSerializable, Serializable

public class JdbcIndex extends Bean
Metadata for a table index and its columns, as reported by JDBC DatabaseMetaData.getIndexInfo.
See Also:
  • Constructor Details

    • JdbcIndex

      public JdbcIndex()
  • Method Details

    • getTable

      public JdbcTable getTable()
      Returns the table this index was added to, or null.
    • setTable

      protected JdbcIndex setTable(JdbcTable table)
      Sets the table this index belongs to; called by JdbcTable.addIndex(JdbcIndex).
    • getIndexName

      public String getIndexName()
    • setIndexName

      public void setIndexName(String indexName)
    • 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 a tableIndexStatistic entry.
    • setPages

      public void setPages(long pages)
      Sets the number of pages the index uses, or the table uses for a tableIndexStatistic entry.
    • getCardinality

      public long getCardinality()
      Returns the number of unique values in the index, or of rows in the table for a tableIndexStatistic entry.
    • setCardinality

      public void setCardinality(long cardinality)
      Sets the number of unique values in the index, or of rows in the table for a tableIndexStatistic entry.
    • getFilterCondition

      public String getFilterCondition()
    • setFilterCondition

      public void setFilterCondition(String filterCondition)
    • getIndexQualifier

      public String getIndexQualifier()
      Returns the index catalog (JDBC INDEX_QUALIFIER), or null.
    • setIndexQualifier

      public void setIndexQualifier(String indexQualifier)
      Sets the index catalog (JDBC INDEX_QUALIFIER).
    • getType

      public int getType()
      Returns the index type as a DatabaseMetaData code: tableIndexStatistic, tableIndexClustered, tableIndexHashed or tableIndexOther.
    • setType

      public void setType(int type)
      Sets the index type as a DatabaseMetaData code: tableIndexStatistic, tableIndexClustered, tableIndexHashed or tableIndexOther.
    • getFieldIndexes

      public List<JdbcFieldIndex> getFieldIndexes()
    • setFieldIndexes

      public void setFieldIndexes(List<JdbcFieldIndex> fieldIndexes)
    • addFieldIndex

      public JdbcIndex addFieldIndex(JdbcFieldIndex jdbcFieldIndex)
    • toRecord

      public Record toRecord()
      Description copied from interface: RecordSerializable
      Converts this object's state to a record that RecordSerializable.fromRecord(Record) can load.
      Specified by:
      toRecord in interface RecordSerializable
      Overrides:
      toRecord in class Bean
    • fromRecord

      public JdbcIndex fromRecord(Record source)
      Description copied from interface: RecordSerializable
      Loads this instance's state from a record and returns this (for fluid API call chaining). For fluid API call chaining, the overridden method should change the declared return type to its class.
      Specified by:
      fromRecord in interface RecordSerializable
      Overrides:
      fromRecord in class Bean
      Parameters:
      source -
      Returns:
      this instance.