java.lang.Object
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.model.IndexImpBase
All Implemented Interfaces:
Index, Serializable, Cloneable
Direct Known Subclasses:
NonUniqueIndex, UniqueIndex

public abstract class IndexImpBase extends Object implements Index
Base class for indices.
Version:
$Revision: $
See Also:
  • Field Details

    • _name

      protected String _name
      The name of the index.
    • _columns

      protected ArrayList _columns
      The columns making up the index.
  • Constructor Details

    • IndexImpBase

      public IndexImpBase()
  • Method Details

    • getName

      public String getName()
      Returns the name of the index.
      Specified by:
      getName in interface Index
      Returns:
      The name
    • setName

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

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

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

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

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

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

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

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

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