Class Key
java.lang.Object
org.datanucleus.store.rdbms.key.Key
- Direct Known Subclasses:
ColumnOrderedKey, ForeignKey, PrimaryKey
Abstract representation of a Key to a table.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClass to add a column to the keyprotected voidUtility to assert if the column is for a different table.booleanEquality operator.Accessor for the column liststatic StringgetColumnList(List<Column> cols) Method to return the list of columns which the key applies to.Accessor for the columns that the key relates to.getName()Accessor for the key name.intAccessor for the number of columns.getTable()Accessor for the tableinthashCode()Hashcode operator.voidSets a column in a specified positionseqfor this index.protected static voidsetListMinimumSize(List<?> list, int size) voidMutator for the key name.
-
Field Details
-
name
Name of the key. -
table
Table that the key applies to. -
columns
-
-
Constructor Details
-
Key
-
-
Method Details
-
setName
-
getName
-
getTable
-
getColumns
-
getColumnList
-
getNumberOfColumns
public int getNumberOfColumns()Accessor for the number of columns.- Returns:
- The number of columns.
-
addColumn
Class to add a column to the key- Parameters:
col- The column to add
-
setColumn
Sets a column in a specified positionseqfor this index.- Parameters:
seq- the specified position for thecolcol- the Column
-
assertSameDatastoreObject
Utility to assert if the column is for a different table.- Parameters:
col- The column to compare with
-
hashCode
-
equals
-
setListMinimumSize
-
getColumnList
-