Class IndexImpBase

java.lang.Object
org.jumpmind.db.model.IndexImpBase
All Implemented Interfaces:
Serializable, Cloneable, IIndex
Direct Known Subclasses:
NonUniqueIndex, UniqueIndex

public abstract class IndexImpBase extends Object implements IIndex
Base class for indices.
See Also:
  • Field Details

  • Constructor Details

    • IndexImpBase

      public IndexImpBase()
  • Method Details

    • getName

      public String getName()
      Description copied from interface: IIndex
      Returns the name of the index.
      Specified by:
      getName in interface IIndex
      Returns:
      The name
    • setName

      public void setName(String name)
      Description copied from interface: IIndex
      Sets the name of the index.
      Specified by:
      setName in interface IIndex
      Parameters:
      name - The name
    • getColumnCount

      public int getColumnCount()
      Description copied from interface: IIndex
      Returns the number of columns that make up this index.
      Specified by:
      getColumnCount in interface IIndex
      Returns:
      The number of index columns
    • getColumn

      public IndexColumn getColumn(int idx)
      Description copied from interface: IIndex
      Returns the indicated column making up this index.
      Specified by:
      getColumn in interface IIndex
      Parameters:
      idx - The index of the column
      Returns:
      The column
    • getColumns

      public IndexColumn[] getColumns()
      Description copied from interface: IIndex
      Returns the columns that make up this index.
      Specified by:
      getColumns in interface IIndex
      Returns:
      The columns
    • hasColumn

      public boolean hasColumn(Column column)
      Description copied from interface: IIndex
      Determines whether this index includes the given column.
      Specified by:
      hasColumn in interface IIndex
      Parameters:
      column - The column to check for
      Returns:
      true if the column is included in this index
    • addColumn

      public void addColumn(IndexColumn column)
      Description copied from interface: IIndex
      Adds a column that makes up this index.
      Specified by:
      addColumn in interface IIndex
      Parameters:
      column - The column to add
    • removeColumn

      public void removeColumn(IndexColumn column)
      Description copied from interface: IIndex
      Removes the given index column from this index.
      Specified by:
      removeColumn in interface IIndex
      Parameters:
      column - The column to remove
    • removeColumn

      public void removeColumn(int idx)
      Description copied from interface: IIndex
      Removes the column at the specified position in this index.
      Specified by:
      removeColumn in interface IIndex
      Parameters:
      idx - The position of the index column to remove
    • clone

      public abstract Object clone() throws CloneNotSupportedException
      Description copied from interface: IIndex
      Clones this index.
      Specified by:
      clone in interface IIndex
      Overrides:
      clone in class Object
      Returns:
      The clone
      Throws:
      CloneNotSupportedException - If the cloning did fail
    • hasAllPrimaryKeys

      public boolean hasAllPrimaryKeys()
      Specified by:
      hasAllPrimaryKeys in interface IIndex
    • removePlatformIndex

      public void removePlatformIndex(PlatformIndex platformIndex)
      Specified by:
      removePlatformIndex in interface IIndex
    • addPlatformIndex

      public void addPlatformIndex(PlatformIndex platformIndex)
      Specified by:
      addPlatformIndex in interface IIndex
    • getPlatformIndexes

      public Map<String,PlatformIndex> getPlatformIndexes()
      Specified by:
      getPlatformIndexes in interface IIndex
    • findPlatformIndex

      public PlatformIndex findPlatformIndex(PlatformIndex platformIndex)
      Specified by:
      findPlatformIndex in interface IIndex
    • clonePlatformIndexes

      protected void clonePlatformIndexes(IndexImpBase indexImpBase) throws CloneNotSupportedException
      Throws:
      CloneNotSupportedException