bill.util.persist
Class EntityKey
java.lang.Object
|
+--bill.util.persist.EntityKey
- public class EntityKey
- extends Object
Defines the elements that may up the key of an entity.
Constructor Summary |
EntityKey(EntityData entity)
Creates a new EntityKey object for the specified entity object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityKey
public EntityKey(EntityData entity)
- Creates a new EntityKey object for the specified entity object.
- Parameters:
entity
- The entity this object is the key for.
addKeyElement
public void addKeyElement(String element)
throws PersistException
- Adds the specified element to the list of elements that make up this
entity's key.
- Parameters:
element
- Then logical name of the element being added to the
list of key elements.- Throws:
PersistException
- If the specified key element is not a defined
element of the entity.
setKeyElements
public void setKeyElements(Vector elements)
throws PersistException
- Mass setter for the list of elements that make up this entity's key.
- Parameters:
elements
- The list of elements to set as the key. This vector
contains a list of logical element name strings.- Throws:
PersistException
- If any of the element names in the vector are
not a defined element of the entity.
getKeyElements
public Vector getKeyElements()
- Retrieves the list of this entity's key elements. The list contains
logical element name strings.
- Returns:
- The list of key elements.
getKeyValues
public Hashtable getKeyValues()
- Gets a list of the key elements and their values.
- Returns:
- A Hashtable keyed by the key element's logical name, with the
element's value as the result.