org.objectweb.speedo.mim.lib
Class BasicSpeedoAccessor

java.lang.Object
  extended byorg.objectweb.speedo.mim.lib.BasicSpeedoAccessor
All Implemented Interfaces:
java.io.Serializable, SpeedoAccessor
Direct Known Subclasses:
GenClassAccessor

public abstract class BasicSpeedoAccessor
extends java.lang.Object
implements SpeedoAccessor

This class is the basic implementation of the SpeedoAccessor interface. It is used at the top of the XXXFields class inheritance.

Author:
S.Chassande-Barrioz
See Also:
Serialized Form

Field Summary
 byte detachedStatus
           
 boolean hasBeenFlush
           
protected  byte jdoStatus
          This timestamp is allocated: - before attach - before detach - before commit
 SpeedoProxy proxy
           
 
Constructor Summary
BasicSpeedoAccessor()
           
BasicSpeedoAccessor(SpeedoProxy _proxy)
           
 
Method Summary
 CacheEntry getCacheEntry()
           
 byte getDetachedStatus()
          Gets the current status of this detached object
 java.lang.Object getMemoryInstance()
           
 SpeedoProxy getSpeedoProxy()
           
 long getTimeStamp()
          Version management is performed via the use of timestamps.
 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 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 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 setTimeStamp(long ts)
           
 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, loadFields, makePersistent, refresh, retrieve
 

Field Detail

jdoStatus

protected byte jdoStatus
This timestamp is allocated: - before attach - before detach - before commit


detachedStatus

public byte detachedStatus

proxy

public SpeedoProxy proxy

hasBeenFlush

public boolean hasBeenFlush
Constructor Detail

BasicSpeedoAccessor

public BasicSpeedoAccessor()

BasicSpeedoAccessor

public BasicSpeedoAccessor(SpeedoProxy _proxy)
Method Detail

getCacheEntry

public CacheEntry getCacheEntry()

getMemoryInstance

public java.lang.Object getMemoryInstance()

jdoChangeStatus

public void jdoChangeStatus(byte action)
Changes the status of this object

Specified by:
jdoChangeStatus in interface SpeedoAccessor
Parameters:
action - the action that may change the status
See Also:
LifeCycle

jdoGetStatus

public byte jdoGetStatus()
Gets the current status of this object

Specified by:
jdoGetStatus in interface SpeedoAccessor
Returns:
the current state in the life cycle
See Also:
LifeCycle

jdoSetStatus

public void jdoSetStatus(byte newValue)
Forces the new value of the status

Specified by:
jdoSetStatus in interface SpeedoAccessor
Parameters:
newValue - the new status of this object
See Also:
LifeCycle

getDetachedStatus

public byte getDetachedStatus()
Description copied from interface: SpeedoAccessor
Gets the current status of this detached object

Specified by:
getDetachedStatus in interface SpeedoAccessor
Returns:
the current state in the life cycle

setDetachedStatus

public void setDetachedStatus(byte newValue)
Description copied from interface: SpeedoAccessor
Forces the new value of the detached status

Specified by:
setDetachedStatus in interface SpeedoAccessor
Parameters:
newValue - the new status of this object

getSpeedoProxy

public SpeedoProxy getSpeedoProxy()
Specified by:
getSpeedoProxy in interface SpeedoAccessor
Returns:
The SpeedoProxy attached to this state representation.

setSpeedoProxy

public void setSpeedoProxy(SpeedoProxy sp)
It assignes the SpeedoProxy attached to this state representation.

Specified by:
setSpeedoProxy in interface SpeedoAccessor

prepareWrite

public void prepareWrite()
Description copied from interface: SpeedoAccessor
Prepare to write (relations consistency management)

Specified by:
prepareWrite in interface SpeedoAccessor

workingSetClosed

public void workingSetClosed()
Description copied from interface: SpeedoAccessor
The context has been closed (ex: transaction end).

Specified by:
workingSetClosed in interface SpeedoAccessor

hasBeenFlush

public boolean hasBeenFlush()
Description copied from interface: SpeedoAccessor
indicates if the object has been flushed on the support in a writing before the end of the working set (commit | rollback | close).

Specified by:
hasBeenFlush in interface SpeedoAccessor

setFlushed

public void setFlushed(boolean val)
Description copied from interface: SpeedoAccessor
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).

Specified by:
setFlushed in interface SpeedoAccessor
Parameters:
val - is the boolean which must be assigned.

getTimeStamp

public long getTimeStamp()
Description copied from interface: SpeedoAccessor
Version management is performed via the use of timestamps.

Specified by:
getTimeStamp in interface SpeedoAccessor

setTimeStamp

public void setTimeStamp(long ts)
Specified by:
setTimeStamp in interface SpeedoAccessor