Package org.datanucleus.store.rdbms.key
Class Index
java.lang.Object
org.datanucleus.store.rdbms.key.Key
org.datanucleus.store.rdbms.key.ColumnOrderedKey
org.datanucleus.store.rdbms.key.Index
Representation of an INDEX.
-
Field Summary
FieldsFields inherited from class org.datanucleus.store.rdbms.key.ColumnOrderedKey
columnOrdering, extensions
-
Constructor Summary
ConstructorsConstructorDescriptionIndex
(CandidateKey ck) Constructor for an index for the specified candidate key.Index
(ForeignKey fk) Constructor for an index for the specified foreign key.Constructor. -
Method Summary
Methods inherited from class org.datanucleus.store.rdbms.key.ColumnOrderedKey
addColumn, getColumnList, getValueForExtension, setColumn, setColumnOrdering
Methods inherited from class org.datanucleus.store.rdbms.key.Key
assertSameDatastoreObject, getColumnList, getColumnList, getColumns, getName, getNumberOfColumns, getTable, setListMinimumSize, setName
-
Field Details
-
EXTENSION_INDEX_EXTENDED_SETTING
- See Also:
-
EXTENSION_INDEX_TYPE
- See Also:
-
isUnique
private final boolean isUnique
-
-
Constructor Details
-
Index
Constructor.- Parameters:
table
- The tableisUnique
- Whether the index is uniqueextensions
- Any extensions for the index
-
Index
Constructor for an index for the specified candidate key.- Parameters:
ck
- Candidate key to use as a basis
-
Index
Constructor for an index for the specified foreign key.- Parameters:
fk
- Foreign key to use as a basis
-
-
Method Details
-
getUnique
public boolean getUnique()Accessor for whether the index is unique- Returns:
- Whether it is unique.
-
hashCode
public int hashCode()Hashcode operator. -
equals
Equality operator. -
toString
Stringify method. Generates a form of the index ready to be used in a DDL statement. e.gINDEX (col1, col2)
-