|
SolarMetric Kodo JDO 3.3.5 generated on August 31 2005 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface implemented by Kodo state managers. Each state manager
manages the state of a single persistence capable instance. The
state manager is also responsible for all communications about the
instance to the StoreManager
.
The fetchXXXField
and storeXXXField
methods can be used to get and set fields of the managed persistent object.
Most back-end code, however, should use the similar
fetchXXX
and storeXXX
methods in place of
the field methods. These methods function just like the field methods, but
also pass the value through the externalizer and factory the field may
have.
Method Summary | |
Object |
fetch(int field)
Return the externalized value of the field with the given index as an object. |
boolean |
fetchBoolean(int field)
Fetch the external value of the given field. |
byte |
fetchByte(int field)
Fetch the external value of the given field. |
char |
fetchChar(int field)
Fetch the external value of the given field. |
double |
fetchDouble(int field)
Fetch the external value of the given field. |
Object |
fetchField(int field,
boolean transitions)
Return the value of the field with the given index as an object. |
float |
fetchFloat(int field)
Fetch the external value of the given field. |
Object |
fetchInitialField(int field)
Return the value of the field at the specified index as of the beginning of the transaction. |
int |
fetchInt(int field)
Fetch the external value of the given field. |
long |
fetchLong(int field)
Fetch the external value of the given field. |
Object |
fetchObject(int field)
Fetch the external value of the given field. |
short |
fetchShort(int field)
Fetch the external value of the given field. |
String |
fetchString(int field)
Fetch the external value of the given field. |
BitSet |
getDirty()
Return a read-only mask of the indexes of all dirty fields. |
BitSet |
getFlushed()
Return a read-only mask of the indexes of all fields that have been flushed since they were last changed. |
Object |
getId()
Return the identifier for this state manager. |
Object |
getImplData()
An object that concrete back ends can associate with each instance. |
Object |
getImplData(int field)
Field-level impl data. |
Object |
getIntermediate(int field)
Use intermediate field data to store intermediate information that might be available before the field is fully loaded. |
JDOState |
getJDOState()
Return the JDO state that this object is in. |
BitSet |
getLoaded()
Return a read-only mask of the indexes of all loaded fields. |
Object |
getLock()
The lock object set for this instance. |
ClassMetaData |
getMetaData()
Get the metadata for this instance. |
Object |
getObjectId()
Return the managed object's id. |
KodoStateManager |
getOwner()
Return the owning state if this is an embedded instance. |
int |
getOwnerField()
Return the field number of the owning object if this is an embedded instance. |
PersistenceCapable |
getPersistenceCapable()
Return the managed instance. |
KodoPersistenceManager |
getPersistenceManager()
Return the managing persistence manager. |
BitSet |
getUnloaded(FetchConfiguration fetch)
Return a mutable mask of the unloaded fields that need loading based on the given fetch configuration. |
Object |
getVersion()
Return the current version indicator for this instance. |
void |
initialize(Class forType,
JDOState state)
Initialize the state manager with a new instance of the given persistence capable type and the proper JDO lifecycle state. |
void |
initialize(PersistenceCapable pc,
JDOState state)
Initialize the state manager with its managed persistence capable object the proper JDO lifecycle state. |
boolean |
isDeleted()
Equivalent to same-named StateManager method. |
boolean |
isDirty()
Equivalent to same-named StateManager method. |
boolean |
isEmbedded()
Return true if this instance has an owner, meaning it is an embedded value. |
boolean |
isFlushed()
Return whether this object has been flushed to the database in this transaction. |
boolean |
isFlushedDirty()
Return whether this object has been flushed, then dirtied again. |
boolean |
isImplDataCacheable()
Whether the instance-level impl data can be shared among instances in different persistence managers if L2 caching is enabled. |
boolean |
isImplDataCacheable(int field)
Whether the field's impl data is loaded and can be shared among instances in different persistence managers if L2 caching is enabled. |
boolean |
isNew()
Equivalent to same-named StateManager method. |
boolean |
isPersistent()
Equivalent to same-named StateManager method. |
boolean |
isTransactional()
Equivalent to same-named StateManager method. |
void |
makeDirty(int field)
Mark the field with the given index as dirty. |
Object |
newFieldProxy(int field)
Create a new hollow proxy instance for the given field. |
Object |
newProxy(int field)
Create a new hollow proxy instance for the given field. |
void |
removed(int field,
Object removed,
boolean key)
Notification given by proxies that the given object was removed from the given container field, and whether removed from its key set or from its elements/values. |
Object |
setImplData(int field,
Object data)
Field-level impl data. |
Object |
setImplData(Object data,
boolean cacheable)
An object that concrete back ends can associate with each instance. |
void |
setIntermediate(int field,
Object value)
Use intermediate field data to store intermediate information that might be available before the field is fully loaded. |
void |
setLock(Object lock)
The lock object set for this instance. |
void |
setNextVersion(Object version)
Set the next version indicator in the datastore pending a successful flush. |
void |
setObjectId(Object oid)
Set the object id for the managed instance. |
void |
setVersion(Object version)
Set the version indicator for this instance, as loaded from the data store. |
void |
store(int field,
Object value)
Set the value of the field with the given index as from the external object value. |
void |
storeBoolean(int field,
boolean externalVal)
Store the given external value back into the given field. |
void |
storeByte(int field,
byte externalVal)
Store the given external value back into the given field. |
void |
storeChar(int field,
char externalVal)
Store the given external value back into the given field. |
void |
storeDouble(int field,
double externalVal)
Store the given external value back into the given field. |
void |
storeField(int field,
Object value)
Set the value of the field with the given index as an object. |
void |
storeFloat(int field,
float externalVal)
Store the given external value back into the given field. |
void |
storeInt(int field,
int externalVal)
Store the given external value back into the given field. |
void |
storeLong(int field,
long externalVal)
Store the given external value back into the given field. |
void |
storeObject(int field,
Object externalVal)
Store the given external value back into the given field. |
void |
storeShort(int field,
short externalVal)
Store the given external value back into the given field. |
void |
storeString(int field,
String externalVal)
Store the given external value back into the given field. |
Methods inherited from interface javax.jdo.spi.PersistenceCapable.ObjectIdFieldConsumer |
storeBooleanField, storeByteField, storeCharField, storeDoubleField, storeFloatField, storeIntField, storeLongField, storeObjectField, storeShortField, storeStringField |
Methods inherited from interface javax.jdo.spi.PersistenceCapable.ObjectIdFieldSupplier |
fetchBooleanField, fetchByteField, fetchCharField, fetchDoubleField, fetchFloatField, fetchIntField, fetchLongField, fetchObjectField, fetchShortField, fetchStringField |
Method Detail |
public void initialize(PersistenceCapable pc, JDOState state)
public void initialize(Class forType, JDOState state)
forType
- the type for which to create a new instancestate
- the initial state to which to set the instancepublic PersistenceCapable getPersistenceCapable()
public ClassMetaData getMetaData()
public KodoStateManager getOwner()
public int getOwnerField()
public boolean isEmbedded()
public boolean isTransactional()
StateManager
method.public boolean isPersistent()
StateManager
method.public boolean isNew()
StateManager
method.public boolean isDeleted()
StateManager
method.public boolean isDirty()
StateManager
method.public boolean isFlushed()
public boolean isFlushedDirty()
public BitSet getLoaded()
public BitSet getDirty()
public BitSet getFlushed()
public BitSet getUnloaded(FetchConfiguration fetch)
public void makeDirty(int field)
public void removed(int field, Object removed, boolean key)
public Object newProxy(int field)
Proxy
. In all other cases,
this method delegates to the system ProxyManager
with the correct field information. The returned proxy's owner is
unset so that modifications to the proxy will not be tracked while its
state is initialized. Calling storeField(int, java.lang.Object)
or store(int, java.lang.Object)
will set the proxy's owner automatically.public Object newFieldProxy(int field)
newProxy(int)
in that it returns a proxy for the
field's declared type, not its externalized type.newProxy(int)
public KodoPersistenceManager getPersistenceManager()
public Object getId()
getObjectId()
.public Object getObjectId()
public void setObjectId(Object oid)
storeXXXField
methods will automatically change the oid.public Object getLock()
public void setLock(Object lock)
public Object getVersion()
public void setVersion(Object version)
StoreManager
when
loading instance data. On rollback, the version will be rolled back
to this value. Version objects should be serializable and should not
require vendor-specific classes, because they are transferred to
detached objects.public void setNextVersion(Object version)
StoreManager
uses this method during flush.public JDOState getJDOState()
public Object getImplData()
public Object setImplData(Object data, boolean cacheable)
cacheable
- whether the impl data can be shared among instances
in different persistence managers if L2 caching is
enabledpublic boolean isImplDataCacheable()
public Object getImplData(int field)
public Object setImplData(int field, Object data)
FieldMetaData.usesImplData()
.public boolean isImplDataCacheable(int field)
public Object getIntermediate(int field)
public void setIntermediate(int field, Object value)
public Object fetchField(int field, boolean transitions)
transitions
- if true, this method will cause state transitions
to occur as if the field were accessed normallypublic void storeField(int field, Object value)
public boolean fetchBoolean(int field)
public byte fetchByte(int field)
public char fetchChar(int field)
public double fetchDouble(int field)
public float fetchFloat(int field)
public int fetchInt(int field)
public long fetchLong(int field)
public Object fetchObject(int field)
public short fetchShort(int field)
public String fetchString(int field)
public Object fetch(int field)
fetchField(int, boolean)
.public void storeBoolean(int field, boolean externalVal)
public void storeByte(int field, byte externalVal)
public void storeChar(int field, char externalVal)
public void storeDouble(int field, double externalVal)
public void storeFloat(int field, float externalVal)
public void storeInt(int field, int externalVal)
public void storeLong(int field, long externalVal)
public void storeObject(int field, Object externalVal)
public void storeShort(int field, short externalVal)
public void storeString(int field, String externalVal)
public void store(int field, Object value)
storeField(int, java.lang.Object)
.public Object fetchInitialField(int field)
|
SolarMetric Kodo JDO 3.3.5 generated on August 31 2005 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |