ENTITY
- The type of the entity being representedBUILDER
- The type of the class that can construct new ENTITY
instancespublic interface PrimaryKey<ENTITY,BUILDER> extends Column<Long,Long,ENTITY,BUILDER>
Most users of hrorm will have no need to directly use this.
Modifier and Type | Method and Description |
---|---|
Long |
getKey(ENTITY item)
Reads the value of the primary key from the passed entity object.
|
default long |
getKeyPrimitive(ENTITY item)
Reads the value of the primary key from the passed entity object.
|
String |
getSequenceName()
The name of the database sequence that is used to populate this key
|
void |
optimisticSetKey(ENTITY item,
Long id)
Sets the key onto the object
|
asGenericColumn, fromResultSet, getName, getPrefix, getSqlTypeName, isNullable, isParentColumn, isPrimaryKey, notNull, populate, setSqlTypeName, setValue, supportedTypes, toClassType, withPrefix
void optimisticSetKey(ENTITY item, Long id)
item
- the object whose key is to be setid
- the primary key to assign itLong getKey(ENTITY item)
item
- The object whose primary key is to be read.String getSequenceName()
default long getKeyPrimitive(ENTITY item)
item
- The object whose primary key is to be read.Copyright © 2019. All rights reserved.