|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cayenne.ObjectId
public class ObjectId
A portable global identifier for persistent objects. ObjectId can be temporary (used for transient or new uncommitted objects) or permanent (used for objects that have been already stored in DB). A temporary ObjectId stores object entity name and a pseudo-unique binary key; permanent id stores a map of values from an external persistent store (aka "primary key").
| Field Summary | |
|---|---|
protected String |
entityName
|
protected byte[] |
key
|
protected Map |
objectIdKeys
|
protected Map |
replacementIdMap
|
| Constructor Summary | |
|---|---|
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 idMap)
Creates a portable permanent ObjectId. |
|
ObjectId(String entityName,
String key,
int value)
Creates a portable permanent ObjectId. |
|
ObjectId(String entityName,
String key,
Object value)
Creates a portable permanent ObjectId. |
|
| Method Summary | |
|---|---|
ObjectId |
createReplacementId()
Creates and returns a replacement ObjectId. |
boolean |
equals(Object object)
|
String |
getEntityName()
|
Map |
getIdSnapshot()
Returns an unmodifiable Map of persistent id values, essentailly a primary key map. |
byte[] |
getKey()
|
Map |
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()
|
String |
toString()
A standard toString method used for debugging. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String entityName
protected Map objectIdKeys
protected byte[] key
protected Map replacementIdMap
| Constructor Detail |
|---|
public ObjectId(String entityName)
public ObjectId(String entityName,
byte[] key)
public ObjectId(String entityName,
String key,
int value)
public ObjectId(String entityName,
String key,
Object value)
public ObjectId(String entityName,
Map idMap)
| Method Detail |
|---|
public boolean isTemporary()
public String getEntityName()
public byte[] getKey()
public Map getIdSnapshot()
public boolean equals(Object object)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic Map getReplacementIdMap()
public ObjectId createReplacementId()
public boolean isReplacementIdAttached()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||