Package org.jumpmind.db.model
Class IndexImpBase
java.lang.Object
org.jumpmind.db.model.IndexImpBase
- All Implemented Interfaces:
Serializable,Cloneable,IIndex
- Direct Known Subclasses:
NonUniqueIndex,UniqueIndex
Base class for indices.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ArrayList<IndexColumn>The columns making up the index.protected StringThe name of the index.protected Map<String,PlatformIndex> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumn(IndexColumn column) Adds a column that makes up this index.voidaddPlatformIndex(PlatformIndex platformIndex) abstract Objectclone()Clones this index.protected voidclonePlatformIndexes(IndexImpBase indexImpBase) findPlatformIndex(PlatformIndex platformIndex) getColumn(int idx) Returns the indicated column making up this index.intReturns the number of columns that make up this index.Returns the columns that make up this index.getName()Returns the name of the index.booleanbooleanDetermines whether this index includes the given column.voidremoveColumn(int idx) Removes the column at the specified position in this index.voidremoveColumn(IndexColumn column) Removes the given index column from this index.voidremovePlatformIndex(PlatformIndex platformIndex) voidSets the name of the index.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jumpmind.db.model.IIndex
equalsIgnoreCase, isUnique, toVerboseString
-
Field Details
-
name
The name of the index. -
columns
The columns making up the index. -
platformIndexes
-
-
Constructor Details
-
IndexImpBase
public IndexImpBase()
-
-
Method Details
-
getName
Description copied from interface:IIndexReturns the name of the index. -
setName
Description copied from interface:IIndexSets the name of the index. -
getColumnCount
public int getColumnCount()Description copied from interface:IIndexReturns the number of columns that make up this index.- Specified by:
getColumnCountin interfaceIIndex- Returns:
- The number of index columns
-
getColumn
Description copied from interface:IIndexReturns the indicated column making up this index. -
getColumns
Description copied from interface:IIndexReturns the columns that make up this index.- Specified by:
getColumnsin interfaceIIndex- Returns:
- The columns
-
hasColumn
Description copied from interface:IIndexDetermines whether this index includes the given column. -
addColumn
Description copied from interface:IIndexAdds a column that makes up this index. -
removeColumn
Description copied from interface:IIndexRemoves the given index column from this index.- Specified by:
removeColumnin interfaceIIndex- Parameters:
column- The column to remove
-
removeColumn
public void removeColumn(int idx) Description copied from interface:IIndexRemoves the column at the specified position in this index.- Specified by:
removeColumnin interfaceIIndex- Parameters:
idx- The position of the index column to remove
-
clone
Description copied from interface:IIndexClones this index.- Specified by:
clonein interfaceIIndex- Overrides:
clonein classObject- Returns:
- The clone
- Throws:
CloneNotSupportedException- If the cloning did fail
-
hasAllPrimaryKeys
public boolean hasAllPrimaryKeys()- Specified by:
hasAllPrimaryKeysin interfaceIIndex
-
removePlatformIndex
- Specified by:
removePlatformIndexin interfaceIIndex
-
addPlatformIndex
- Specified by:
addPlatformIndexin interfaceIIndex
-
getPlatformIndexes
- Specified by:
getPlatformIndexesin interfaceIIndex
-
findPlatformIndex
- Specified by:
findPlatformIndexin interfaceIIndex
-
clonePlatformIndexes
- Throws:
CloneNotSupportedException
-