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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jminor.common.model.valuemap.ValueMap
ValueMap.ToString<K>
 
Method Summary
 String getEntityID()
           
 Property.PrimaryKeyProperty getFirstKeyProperty()
           
 Object getFirstKeyValue()
           
 List<Property.PrimaryKeyProperty> getProperties()
           
 int getPropertyCount()
           
 boolean isCompositeKey()
           
 boolean isNull()
           
 boolean isSingleIntegerKey()
           
 
Methods inherited from interface org.jminor.common.model.valuemap.ValueMap
clear, containsValue, copyValue, getValueKeys, getValues, isValueNull, removeValue, setValue, size
 
Methods inherited from interface org.jminor.common.model.valuemap.ValueProvider
getValue
 
Methods inherited from interface org.jminor.common.model.valuemap.ValueAsStringProvider
getValueAsString
 

Method Detail

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