public final class CompoundKey extends Object implements Serializable
DataObjectService.find(Class, Object)
in situations where you have a data object which has a compound
primary key represented by more than one field. In such cases the keys in the map you construction this class with
should be the field names of the primary key fields, and the values in the maps should be the values by which you
want to perform the find.Constructor and Description |
---|
CompoundKey(Map<String,?> keys)
Construct a new instance of a CompoundKey from the given key values map.
|
Modifier and Type | Method and Description |
---|---|
Map<String,?> |
getKeys()
Returns an unmodifable Map of the key values on this CompoundKey
|
boolean |
hasNullKeyValues()
Returns true if any of the fields in this compound key have null values, since that usually indicates an
incomplete and unsaved object.
|
public CompoundKey(Map<String,?> keys)
keys
- map of field name to value for the compound key, must be non-null and non-emptyIllegalArgumentException
- if the given Map is null or emptypublic Map<String,?> getKeys()
public boolean hasNullKeyValues()
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.