|
SolarMetric Kodo JDO 3.0.3 generated on February 20 2004 | ||||||||
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. |
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. |
Collection |
getDirtyFields()
Return a set of FieldMetaData s for all dirty fields; this
operation is slower than getDirty() . |
BitSet |
getFlushed()
Return a read-only mask of the indexes of all fields that have been flushed since they were last changed. |
Collection |
getFlushedFields()
Return a set of FieldMetaData s for all flushed fields; this
operation is slower than getFlushed() . |
Object |
getImplData(Object key)
Return the associated implementation object for the given key, if any. |
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. |
Collection |
getLoadedFields()
Return a set of FieldMetaData s for all loaded fields; this
operation is slower than getLoaded() . |
ClassMetaData |
getMetaData()
Get the metadata for this instance. |
Object |
getObjectId(boolean trans,
boolean owner)
Return this state manager's object id as of the beginning of the transaction. |
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. |
Collection |
getUnloadedFields(FetchConfiguration fetch)
Return the unloaded fields that need loading based on the given fetch configuration. |
Object |
getVersion()
Return the current version indicator for this instance. |
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 |
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 |
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 |
removeImplData(Object key)
Remove the given key from the store of implementation-specific data, returning the key's value (if any). |
void |
setImplData(Object key,
Object value,
boolean sticky)
This method is provided to the concrete JDO implementation to allow the association of arbitrary extra data with an 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 |
setNextVersion(Object version)
Set the next version indicator in the datastore pending a successful flush. |
void |
setTransactionalObjectId(Object oid)
Set the transactional object id for this 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 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 BitSet getLoaded()
public BitSet getDirty()
public BitSet getFlushed()
public Collection getLoadedFields()
FieldMetaData
s for all loaded fields; this
operation is slower than getLoaded()
.public Collection getDirtyFields()
FieldMetaData
s for all dirty fields; this
operation is slower than getDirty()
.public Collection getFlushedFields()
FieldMetaData
s for all flushed fields; this
operation is slower than getFlushed()
.public Collection getUnloadedFields(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 KodoPersistenceManager getPersistenceManager()
public Object getObjectId(boolean trans, boolean owner)
StateManager
method that takes a pc instance.trans
- if true, return the oid value based on the current
values of the primary key fields; if false return the
value as of the beginning of the transactionowner
- if true, recurse to the top-most owning state manager
(if this instance is embedded) to get the oidpublic void setTransactionalObjectId(Object oid)
storeXXXField
methods.public Object getVersion()
public void setVersion(Object version)
StoreManager
when
loading instance data. On rollback, the version will be rolled back
to this value.public void setNextVersion(Object version)
StoreManager
uses this method during flush.public Object getImplData(Object key)
public Object removeImplData(Object key)
public void setImplData(Object key, Object value, boolean sticky)
sticky
parameter is true, then the data
will remain with the state manager until you remove it. Otherwise,
the data will be cleared the next time the state manager's fields
are cleared.public Object getIntermediate(int field)
public void setIntermediate(int field, Object value)
public JDOState getJDOState()
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)
.
|
SolarMetric Kodo JDO 3.0.3 generated on February 20 2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |