public class ObjectId extends Object implements Serializable
| Modifier and Type | Field and Description | 
|---|---|
| protected String | entityName | 
| protected byte[] | key | 
| protected Map<String,Object> | objectIdKeys | 
| protected Map<String,Object> | replacementIdMap | 
| Constructor and Description | 
|---|
| ObjectId(String entityName)Creates a TEMPORARY ObjectId. | 
| ObjectId(String entityName,
        byte[] key)Creates a TEMPORARY id with a specified entity name and a binary key. | 
| ObjectId(String entityName,
        Map<String,?> idMap)Creates a portable permanent ObjectId as a compound primary key. | 
| ObjectId(String entityName,
        String key,
        int value)Creates a portable permanent ObjectId. | 
| ObjectId(String entityName,
        String key,
        Object value)Creates a portable permanent ObjectId. | 
| Modifier and Type | Method and Description | 
|---|---|
| ObjectId | createReplacementId()Creates and returns a replacement ObjectId. | 
| boolean | equals(Object object) | 
| String | getEntityName() | 
| Map<String,Object> | getIdSnapshot()Returns an unmodifiable Map of persistent id values, essentially a
 primary key map. | 
| byte[] | getKey()Get the binary temporary object id. | 
| Map<String,Object> | getReplacementIdMap()Returns a non-null mutable map that can be used to append replacement id
 values. | 
| int | hashCode() | 
| boolean | isReplacementIdAttached()Returns true if there is full or partial replacement id attached to this
 id. | 
| boolean | isTemporary()Is this is temporary object id (used for objects which are not yet
 persisted to the data store). | 
| String | toString()A standard toString method used for debugging. | 
protected String entityName
protected byte[] key
public ObjectId(String entityName)
public ObjectId(String entityName, byte[] key)
public ObjectId(String entityName, String key, int value)
entityName - The entity name which this object id is forkey - A key describing this object id, usually the attribute name
            for the primary keyvalue - The unique value for this object idpublic ObjectId(String entityName, String key, Object value)
entityName - The entity name which this object id is forkey - A key describing this object id, usually the attribute name
            for the primary keyvalue - The unique value for this object idpublic ObjectId(String entityName, Map<String,?> idMap)
entityName - The entity name which this object id is foridMap - Keys are usually the attribute names for each part of the
            primary key. Values are unique when taken as a whole.public boolean isTemporary()
public String getEntityName()
public byte[] getKey()
public Map<String,Object> getIdSnapshot()
public Map<String,Object> getReplacementIdMap()
public ObjectId createReplacementId()
public boolean isReplacementIdAttached()
Copyright © 2001–2023 Apache Cayenne. All rights reserved.