|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.objectweb.speedo.mim.lib.BasicSpeedoAccessor
This class is the basic implementation of the SpeedoAccessor interface. It is used at the top of the XXXFields class inheritance.
| Field Summary | |
|---|---|
byte |
detachedStatus
|
boolean |
hasBeenFlush
|
protected boolean |
isToMerge
|
protected byte |
jdoStatus
This version is allocated: - before attach - before detach - before commit |
SpeedoProxy |
proxy
|
| Constructor Summary | |
|---|---|
BasicSpeedoAccessor()
|
|
BasicSpeedoAccessor(SpeedoProxy _proxy)
|
|
| Method Summary | |
|---|---|
void |
changeVersion()
change the version of this only if needed The version is computed by this method A call to changeVersion can have no effect. |
boolean |
checkVersion(SpeedoAccessor sa)
check the validity of the version of sa compared to the persistent object this. |
org.objectweb.perseus.cache.api.CacheEntry |
getCacheEntry()
|
byte |
getDetachedStatus()
Gets the current status of this detached object |
java.lang.Object |
getMemoryInstance()
|
SpeedoProxy |
getSpeedoProxy()
|
java.lang.Object |
getUserKey(int cacheId)
|
long |
getVersion()
Return the version of the object as a long |
boolean |
hasBeenFlush()
indicates if the object has been flushed on the support in a writing before the end of the working set (commit | rollback | close). |
void |
indexFieldModified(int cacheId,
boolean rebind)
The field uses in user cache, has been modified. |
boolean |
isToMerge()
indicates if the State has to be merge with the reference state at commit time. |
void |
jdoChangeStatus(byte action)
Changes the status of this object |
byte |
jdoGetStatus()
Gets the current status of this object |
void |
jdoSetStatus(byte newValue)
Forces the new value of the status |
void |
makeToMerge(java.lang.Object thinLock)
Mark the current state with the flag 'toMerge'. |
org.objectweb.perseus.persistence.api.State |
merge(org.objectweb.perseus.persistence.api.State oldState)
This action updates the old state with the change (delta) done in the transaction on this state. |
void |
prepareWrite()
Prepare to write (relations consistency management) |
void |
setDetachedStatus(byte newValue)
Forces the new value of the detached status |
void |
setFlushed(boolean val)
Assignates a boolean value to indicate if the object has been flushed on the support in a writing before the end of the working set (commit | rollback | close). |
void |
setSpeedoProxy(SpeedoProxy sp)
It assignes the SpeedoProxy attached to this state representation. |
void |
workingSetClosed()
The context has been closed (ex: transaction end). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.objectweb.speedo.mim.api.SpeedoAccessor |
|---|
attachCopy, deletePersistent, detachCopy, forceDetachedDirty, loadFields, makePersistent, refresh, restoreDetachedNone, retrieve, unSwizzle |
| Field Detail |
protected byte jdoStatus
public byte detachedStatus
protected boolean isToMerge
public SpeedoProxy proxy
public boolean hasBeenFlush
| Constructor Detail |
public BasicSpeedoAccessor()
public BasicSpeedoAccessor(SpeedoProxy _proxy)
| Method Detail |
public org.objectweb.perseus.cache.api.CacheEntry getCacheEntry()
getCacheEntry in interface org.objectweb.perseus.persistence.api.Statepublic java.lang.Object getMemoryInstance()
getMemoryInstance in interface org.objectweb.jorm.api.PAccessorpublic void jdoChangeStatus(byte action)
jdoChangeStatus in interface SpeedoAccessoraction - the action that may change the statusLifeCyclepublic byte jdoGetStatus()
jdoGetStatus in interface SpeedoAccessorLifeCyclepublic void jdoSetStatus(byte newValue)
jdoSetStatus in interface SpeedoAccessornewValue - the new status of this objectLifeCyclepublic byte getDetachedStatus()
SpeedoAccessor
getDetachedStatus in interface SpeedoAccessorpublic void setDetachedStatus(byte newValue)
SpeedoAccessor
setDetachedStatus in interface SpeedoAccessornewValue - the new status of this objectpublic SpeedoProxy getSpeedoProxy()
getSpeedoProxy in interface SpeedoAccessorpublic void setSpeedoProxy(SpeedoProxy sp)
setSpeedoProxy in interface SpeedoAccessorpublic void prepareWrite()
SpeedoAccessor
prepareWrite in interface SpeedoAccessorpublic void workingSetClosed()
SpeedoAccessor
workingSetClosed in interface SpeedoAccessorpublic boolean hasBeenFlush()
SpeedoAccessor
hasBeenFlush in interface SpeedoAccessorpublic void setFlushed(boolean val)
SpeedoAccessor
setFlushed in interface SpeedoAccessorval - is the boolean which must be assigned.public void changeVersion()
SpeedoAccessor
changeVersion in interface SpeedoAccessorpublic boolean checkVersion(SpeedoAccessor sa)
SpeedoAccessor
checkVersion in interface SpeedoAccessorpublic long getVersion()
SpeedoAccessor
getVersion in interface SpeedoAccessorpublic boolean isToMerge()
SpeedoAccessor
isToMerge in interface SpeedoAccessorpublic void makeToMerge(java.lang.Object thinLock)
SpeedoAccessor
makeToMerge in interface SpeedoAccessorthinLock - is an object representing the thin lockpublic org.objectweb.perseus.persistence.api.State merge(org.objectweb.perseus.persistence.api.State oldState)
SpeedoAccessor
merge in interface SpeedoAccessoroldState - is the state which has to be updated
public java.lang.Object getUserKey(int cacheId)
public void indexFieldModified(int cacheId,
boolean rebind)
SpeedoAccessor
indexFieldModified in interface SpeedoAccessorcacheId - is the cache identifier. The value Integer.MAX_VALUE
means that all user cache must be updated.rebind - if true, the speedoAcessor is rebound
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||