org.jminor.framework.domain
Interface Entity.Key
- All Superinterfaces:
- ValueAsStringProvider<String>, ValueCollectionProvider<Object>, ValueMap<String,Object>, ValueProvider<String,Object>
- Enclosing interface:
- Entity
public static interface Entity.Key
- extends ValueMap<String,Object>
A class representing a primary key.
getEntityID
String getEntityID()
- Returns:
- the entity ID
getProperties
List<Property.PrimaryKeyProperty> getProperties()
- Returns:
- a List containing the properties comprising this key
getPropertyCount
int getPropertyCount()
- Returns:
- the number of properties comprising this key
isNull
boolean isNull()
- Returns:
- true if one of the primary key properties has a null value
isSingleIntegerKey
boolean isSingleIntegerKey()
- Returns:
- true if this primary key is based on a single integer column
isCompositeKey
boolean isCompositeKey()
- Returns:
- true if this key is comprised of multiple properties.
getFirstKeyProperty
Property.PrimaryKeyProperty getFirstKeyProperty()
- Returns:
- the first key property, useful for single property keys
getFirstKeyValue
Object getFirstKeyValue()
- Returns:
- the first value contained in this key, useful for single property keys