Package org.jumpmind.db.model
Interface IIndex
- All Superinterfaces:
Cloneable
,Serializable
- All Known Implementing Classes:
IndexImpBase
,NonUniqueIndex
,UniqueIndex
Represents an index definition for a table which may be either unique or non-unique.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addColumn
(IndexColumn column) Adds a column that makes up this index.void
addIncludedColumn
(IndexColumn column) void
addPlatformIndex
(PlatformIndex platformIndex) clone()
Clones this index.boolean
equalsIgnoreCase
(IIndex otherIndex) Compares this index to the given one while ignoring the case of identifiers.findPlatformIndex
(PlatformIndex platformIndex) 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.getIncludedColumn
(int idx) int
getName()
Returns the name of the index.boolean
boolean
Determines whether this index includes the given column.boolean
hasIncludedColumn
(Column column) boolean
isUnique()
Determines whether this index is unique or not.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
removePlatformIndex
(PlatformIndex platformIndex) void
Sets the name of the index.Returns a verbose string representation of this index.
-
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
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
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
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
Adds a column that makes up this index.- Parameters:
column
- The column to add
-
removeColumn
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
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
-
addPlatformIndex
-
getPlatformIndexes
Map<String,PlatformIndex> getPlatformIndexes() -
findPlatformIndex
-
getIncludedColumnCount
int getIncludedColumnCount() -
getIncludedColumn
-
getIncludedColumns
IndexColumn[] getIncludedColumns() -
hasIncludedColumn
-
addIncludedColumn
-