Class IndexImpBase
java.lang.Object
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.model.IndexImpBase
- All Implemented Interfaces:
Index
,Serializable
,Cloneable
- Direct Known Subclasses:
NonUniqueIndex
,UniqueIndex
Base class for indices.
- Version:
- $Revision: $
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addColumn
(IndexColumn column) Adds a column that makes up this index.abstract Object
clone()
Clones this index.getColumn
(int idx) Returns the indicated column making up this index.int
Returns the number of columns that make up this index.Returns the columns that make up this index.getName()
Returns the name of the index.boolean
Determines whether this index includes the given column.void
removeColumn
(int idx) Removes the column at the specified position in this index.void
removeColumn
(IndexColumn column) Removes the given index column from this index.void
Sets the name of the index.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.internet2.middleware.grouper.ext.org.apache.ddlutils.model.Index
equalsIgnoreCase, isUnique, toVerboseString
-
Field Details
-
_name
The name of the index. -
_columns
The columns making up the index.
-
-
Constructor Details
-
IndexImpBase
public IndexImpBase()
-
-
Method Details
-
getName
Returns the name of the index. -
setName
Sets the name of the index. -
getColumnCount
public int getColumnCount()Returns the number of columns that make up this index.- Specified by:
getColumnCount
in interfaceIndex
- Returns:
- The number of index columns
-
getColumn
Returns the indicated column making up this index. -
getColumns
Returns the columns that make up this index.- Specified by:
getColumns
in interfaceIndex
- Returns:
- The columns
-
hasColumn
Determines whether this index includes the given column. -
addColumn
Adds a column that makes up this index. -
removeColumn
Removes the given index column from this index.- Specified by:
removeColumn
in interfaceIndex
- 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 interfaceIndex
- Parameters:
idx
- The position of the index column to remove
-
clone
Clones this index.- Specified by:
clone
in interfaceIndex
- Overrides:
clone
in classObject
- Returns:
- The clone
- Throws:
CloneNotSupportedException
- If the cloning did fail
-