Interface IIndex

All Superinterfaces:
Cloneable, Serializable
All Known Implementing Classes:
IndexImpBase, NonUniqueIndex, UniqueIndex

public interface IIndex extends Cloneable, Serializable
Represents an index definition for a table which may be either unique or non-unique.
  • Method Details

    • isUnique

      boolean isUnique()
      Determines whether this index is unique or not.
      Returns:
      true if the index is an unique one
    • getName

      String getName()
      Returns the name of the index.
      Returns:
      The name
    • setName

      void setName(String name)
      Sets the name of the index.
      Parameters:
      name - The name
    • getColumnCount

      int getColumnCount()
      Returns the number of columns that make up this index.
      Returns:
      The number of index columns
    • getColumn

      IndexColumn getColumn(int idx)
      Returns the indicated column making up this index.
      Parameters:
      idx - The index of the column
      Returns:
      The column
    • getColumns

      IndexColumn[] getColumns()
      Returns the columns that make up this index.
      Returns:
      The columns
    • hasColumn

      boolean hasColumn(Column column)
      Determines whether this index includes the given column.
      Parameters:
      column - The column to check for
      Returns:
      true if the column is included in this index
    • addColumn

      void addColumn(IndexColumn column)
      Adds a column that makes up this index.
      Parameters:
      column - The column to add
    • removeColumn

      void removeColumn(IndexColumn column)
      Removes the given index column from this index.
      Parameters:
      column - The column to remove
    • removeColumn

      void removeColumn(int idx)
      Removes the column at the specified position in this index.
      Parameters:
      idx - The position of the index column to remove
    • clone

      Clones this index.
      Returns:
      The clone
      Throws:
      CloneNotSupportedException - If the cloning did fail
    • equalsIgnoreCase

      boolean equalsIgnoreCase(IIndex otherIndex)
      Compares this index to the given one while ignoring the case of identifiers.
      Parameters:
      otherIndex - The other index
      Returns:
      true if this index is equal (ignoring case) to the given one
    • toVerboseString

      String toVerboseString()
      Returns a verbose string representation of this index.
      Returns:
      The string representation
    • hasAllPrimaryKeys

      boolean hasAllPrimaryKeys()
    • removePlatformIndex

      void removePlatformIndex(PlatformIndex platformIndex)
    • addPlatformIndex

      void addPlatformIndex(PlatformIndex platformIndex)
    • getPlatformIndexes

      Map<String,PlatformIndex> getPlatformIndexes()
    • findPlatformIndex

      PlatformIndex findPlatformIndex(PlatformIndex platformIndex)
    • getIncludedColumnCount

      int getIncludedColumnCount()
    • getIncludedColumn

      IndexColumn getIncludedColumn(int idx)
    • getIncludedColumns

      IndexColumn[] getIncludedColumns()
    • hasIncludedColumn

      boolean hasIncludedColumn(Column column)
    • addIncludedColumn

      void addIncludedColumn(IndexColumn column)