| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.gora.persistency.impl.StateManagerImpl
public class StateManagerImpl
An implementation for the StateManager. This implementation assumes every Persistent object has it's own StateManager.
| Field Summary | |
|---|---|
| protected  BitSet | dirtyBits | 
| protected  boolean | isNew | 
| protected  BitSet | readableBits | 
| Constructor Summary | |
|---|---|
| StateManagerImpl() | |
| Method Summary | |
|---|---|
|  void | clearDirty(Persistent persistent)Clears the dirty state. | 
|  void | clearDirty(Persistent persistent,
           int fieldIndex)Clears the field as dirty. | 
|  void | clearNew(Persistent persistent)Clears the new state | 
|  void | clearReadable(Persistent persistent)Clears the readable state. | 
|  void | clearReadable(Persistent persistent,
              int fieldIndex)Clears the field as readable. | 
|  boolean | isDirty(Persistent persistent)Returns whether any of the fields of the object has been modified after construction or loading. | 
|  boolean | isDirty(Persistent persistent,
        int fieldIndex)Returns whether the field has been modified. | 
|  boolean | isNew(Persistent persistent)Returns whether the object is newly constructed. | 
|  boolean | isReadable(Persistent persistent,
           int fieldIndex)Returns whether the field has been loaded from the datastore. | 
|  void | setDirty(Persistent persistent)Sets all the fields of the object as dirty. | 
|  void | setDirty(Persistent persistent,
         int fieldIndex)Sets the field as dirty. | 
|  void | setManagedPersistent(Persistent persistent)If one state manager is allocated per persistent object, call this method to set the managed persistent. | 
|  void | setNew(Persistent persistent)Sets the state of the object as new for persistency | 
|  void | setReadable(Persistent persistent,
            int fieldIndex)Sets the field as readable. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected boolean isNew
protected BitSet dirtyBits
protected BitSet readableBits
| Constructor Detail | 
|---|
public StateManagerImpl()
| Method Detail | 
|---|
public void setManagedPersistent(Persistent persistent)
StateManager
setManagedPersistent in interface StateManagerpersistent - the persistent to managepublic boolean isNew(Persistent persistent)
StateManager
isNew in interface StateManagerpublic void setNew(Persistent persistent)
StateManager
setNew in interface StateManagerpublic void clearNew(Persistent persistent)
StateManager
clearNew in interface StateManager
public void setDirty(Persistent persistent,
                     int fieldIndex)
StateManager
setDirty in interface StateManagerfieldIndex - the offset of the field in the object
public boolean isDirty(Persistent persistent,
                       int fieldIndex)
StateManager
isDirty in interface StateManagerfieldIndex - the offset of the field in the object
public boolean isDirty(Persistent persistent)
StateManager
isDirty in interface StateManagerpublic void setDirty(Persistent persistent)
StateManager
setDirty in interface StateManager
public void clearDirty(Persistent persistent,
                       int fieldIndex)
StateManager
clearDirty in interface StateManagerfieldIndex - the offset of the field in the objectpublic void clearDirty(Persistent persistent)
StateManager
clearDirty in interface StateManager
public void setReadable(Persistent persistent,
                        int fieldIndex)
StateManager
setReadable in interface StateManagerfieldIndex - the offset of the field in the object
public boolean isReadable(Persistent persistent,
                          int fieldIndex)
StateManager
isReadable in interface StateManagerfieldIndex - the offset of the field in the object
public void clearReadable(Persistent persistent,
                          int fieldIndex)
StateManager
clearReadable in interface StateManagerfieldIndex - the offset of the field in the objectpublic void clearReadable(Persistent persistent)
StateManager
clearReadable in interface StateManager| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||