|
Cumulus4j API (1.1.0) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cumulus4j.store.model.ObjectContainer
public class ObjectContainer
Container holding the values of a persistent object.
Objects to be stored in the database, are first represented by an instance of ObjectContainer
and
then serialised into a byte-array, which is finally encrypted and put into a DataEntry
's value
.
Note, that references to other objects
are either not stored at all (in a "mapped-by"-relationship) or stored via the other object's
dataEntryID
; a persistent object is never stored as-is.
Constructor Summary | |
---|---|
ObjectContainer()
|
Method Summary | |
---|---|
ObjectContainer |
clone()
|
Map<Long,Object> |
getFieldID2value()
|
Object |
getValue(long fieldID)
Get a value. |
Object |
getVersion()
Get the object's version or null , if the persistence-capable class has no versioning enabled. |
void |
setValue(long fieldID,
Object value)
Set a value. |
protected void |
setValues(Map<Long,Object> fieldID2value)
|
void |
setVersion(Object version)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectContainer()
Method Detail |
---|
public Object getValue(long fieldID)
fieldID
- the field's persistent ID, i.e. a reference to FieldMeta.fieldID
.
null
.public void setValue(long fieldID, Object value)
fieldID
- the field's persistent ID, i.e. a reference to FieldMeta.fieldID
.value
- either the raw value or the object-ID of a persistable object. Persistable objects are never stored
directly in an ObjectContainer
.protected void setValues(Map<Long,Object> fieldID2value)
public Map<Long,Object> getFieldID2value()
public Object getVersion()
null
, if the persistence-capable class has no versioning enabled.
The version can be a Long
, a Date
or anything else supported by DataNucleus/JDO.
null
.public void setVersion(Object version)
public ObjectContainer clone()
clone
in class Object
|
Cumulus4j API (1.1.0) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |