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 ArrayList<IndexColumn>
protected String
The name of the index.protected Map<String,
PlatformIndex> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addColumn
(IndexColumn column) Adds a column that makes up this index.void
addIncludedColumn
(IndexColumn column) void
addPlatformIndex
(PlatformIndex platformIndex) abstract Object
clone()
Clones this index.protected void
clonePlatformIndexes
(IndexImpBase indexImpBase) 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) 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.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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. -
includedColumns
-
platformIndexes
-
-
Constructor Details
-
IndexImpBase
public IndexImpBase()
-
-
Method Details
-
getName
Description copied from interface:IIndex
Returns the name of the index. -
setName
Description copied from interface:IIndex
Sets the name of the index. -
getColumnCount
public int getColumnCount()Description copied from interface:IIndex
Returns the number of columns that make up this index.- Specified by:
getColumnCount
in interfaceIIndex
- Returns:
- The number of index columns
-
getColumn
Description copied from interface:IIndex
Returns the indicated column making up this index. -
getColumns
Description copied from interface:IIndex
Returns the columns that make up this index.- Specified by:
getColumns
in interfaceIIndex
- Returns:
- The columns
-
hasColumn
Description copied from interface:IIndex
Determines whether this index includes the given column. -
addColumn
Description copied from interface:IIndex
Adds a column that makes up this index. -
removeColumn
Description copied from interface:IIndex
Removes the given index column from this index.- Specified by:
removeColumn
in interfaceIIndex
- 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 interfaceIIndex
- Parameters:
idx
- The position of the index column to remove
-
getIncludedColumnCount
public int getIncludedColumnCount()- Specified by:
getIncludedColumnCount
in interfaceIIndex
-
getIncludedColumn
- Specified by:
getIncludedColumn
in interfaceIIndex
-
getIncludedColumns
- Specified by:
getIncludedColumns
in interfaceIIndex
-
hasIncludedColumn
- Specified by:
hasIncludedColumn
in interfaceIIndex
-
addIncludedColumn
- Specified by:
addIncludedColumn
in interfaceIIndex
-
clone
Description copied from interface:IIndex
Clones this index.- Specified by:
clone
in interfaceIIndex
- Overrides:
clone
in classObject
- Returns:
- The clone
- Throws:
CloneNotSupportedException
- If the cloning did fail
-
hasAllPrimaryKeys
public boolean hasAllPrimaryKeys()- Specified by:
hasAllPrimaryKeys
in interfaceIIndex
-
removePlatformIndex
- Specified by:
removePlatformIndex
in interfaceIIndex
-
addPlatformIndex
- Specified by:
addPlatformIndex
in interfaceIIndex
-
getPlatformIndexes
- Specified by:
getPlatformIndexes
in interfaceIIndex
-
findPlatformIndex
- Specified by:
findPlatformIndex
in interfaceIIndex
-
clonePlatformIndexes
- Throws:
CloneNotSupportedException
-