| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface StateManager
This interface is the point of contact between managed instances of
 PersistenceCapable classes and the JDO implementation.  It 
 contains the methods used by PersistenceCapable instances to 
 delegate behavior to the JDO implementation.
Each managed PersistenceCapable instance contains a reference 
 to a StateManager.  A StateManager might manage one 
 or multiple instances of PersistenceCapable instances, at the 
 choice of the implementation.
| Method Summary | |
|---|---|
|  boolean | getBooleanField(PersistenceCapable pc,
                int field,
                boolean currentValue)Return the value for the field. | 
|  byte | getByteField(PersistenceCapable pc,
             int field,
             byte currentValue)Return the value for the field. | 
|  char | getCharField(PersistenceCapable pc,
             int field,
             char currentValue)Return the value for the field. | 
|  double | getDoubleField(PersistenceCapable pc,
               int field,
               double currentValue)Return the value for the field. | 
|  float | getFloatField(PersistenceCapable pc,
              int field,
              float currentValue)Return the value for the field. | 
|  int | getIntField(PersistenceCapable pc,
            int field,
            int currentValue)Return the value for the field. | 
|  long | getLongField(PersistenceCapable pc,
             int field,
             long currentValue)Return the value for the field. | 
|  java.lang.Object | getObjectField(PersistenceCapable pc,
               int field,
               java.lang.Object currentValue)Return the value for the field. | 
|  java.lang.Object | getObjectId(PersistenceCapable pc)Return the object representing the JDO identity of the calling instance. | 
|  PersistenceManager | getPersistenceManager(PersistenceCapable pc)Return the PersistenceManagerthat owns this instance. | 
|  short | getShortField(PersistenceCapable pc,
              int field,
              short currentValue)Return the value for the field. | 
|  java.lang.String | getStringField(PersistenceCapable pc,
               int field,
               java.lang.String currentValue)Return the value for the field. | 
|  java.lang.Object | getTransactionalObjectId(PersistenceCapable pc)Return the object representing the JDO identity of the calling instance. | 
|  java.lang.Object | getVersion(PersistenceCapable pc)Return the object representing the version of the calling instance. | 
|  boolean | isDeleted(PersistenceCapable pc)Tests whether this object has been deleted. | 
|  boolean | isDirty(PersistenceCapable pc)Tests whether this object is dirty. | 
|  boolean | isLoaded(PersistenceCapable pc,
         int field)Return trueif the field is cached in the calling
 instance. | 
|  boolean | isNew(PersistenceCapable pc)Tests whether this object has been newly made persistent. | 
|  boolean | isPersistent(PersistenceCapable pc)Tests whether this object is persistent. | 
|  boolean | isTransactional(PersistenceCapable pc)Tests whether this object is transactional. | 
|  void | makeDirty(PersistenceCapable pc,
          java.lang.String fieldName)Mark the associated PersistenceCapablefield dirty. | 
|  void | preSerialize(PersistenceCapable pc)Guarantee that the serializable transactional and persistent fields are loaded into the instance. | 
|  void | providedBooleanField(PersistenceCapable pc,
                     int field,
                     boolean currentValue)The value of the field requested to be provided to the StateManager. | 
|  void | providedByteField(PersistenceCapable pc,
                  int field,
                  byte currentValue)The value of the field requested to be provided to the StateManager. | 
|  void | providedCharField(PersistenceCapable pc,
                  int field,
                  char currentValue)The value of the field requested to be provided to the StateManager. | 
|  void | providedDoubleField(PersistenceCapable pc,
                    int field,
                    double currentValue)The value of the field requested to be provided to the StateManager. | 
|  void | providedFloatField(PersistenceCapable pc,
                   int field,
                   float currentValue)The value of the field requested to be provided to the StateManager. | 
|  void | providedIntField(PersistenceCapable pc,
                 int field,
                 int currentValue)The value of the field requested to be provided to the StateManager. | 
|  void | providedLongField(PersistenceCapable pc,
                  int field,
                  long currentValue)The value of the field requested to be provided to the StateManager. | 
|  void | providedObjectField(PersistenceCapable pc,
                    int field,
                    java.lang.Object currentValue)The value of the field requested to be provided to the StateManager. | 
|  void | providedShortField(PersistenceCapable pc,
                   int field,
                   short currentValue)The value of the field requested to be provided to the StateManager. | 
|  void | providedStringField(PersistenceCapable pc,
                    int field,
                    java.lang.String currentValue)The value of the field requested to be provided to the StateManager. | 
|  boolean | replacingBooleanField(PersistenceCapable pc,
                      int field)The replacement value of the field in the calling instance. | 
|  byte | replacingByteField(PersistenceCapable pc,
                   int field)The replacement value of the field in the calling instance. | 
|  char | replacingCharField(PersistenceCapable pc,
                   int field)The replacement value of the field in the calling instance. | 
|  java.lang.Object[] | replacingDetachedState(Detachable pc,
                       java.lang.Object[] state)The replacement value of the detached state in the calling instance. | 
|  double | replacingDoubleField(PersistenceCapable pc,
                     int field)The replacement value of the field in the calling instance. | 
|  byte | replacingFlags(PersistenceCapable pc)The owning StateManageruses this method to supply the 
 value of the flags to thePersistenceCapableinstance. | 
|  float | replacingFloatField(PersistenceCapable pc,
                    int field)The replacement value of the field in the calling instance. | 
|  int | replacingIntField(PersistenceCapable pc,
                  int field)The replacement value of the field in the calling instance. | 
|  long | replacingLongField(PersistenceCapable pc,
                   int field)The replacement value of the field in the calling instance. | 
|  java.lang.Object | replacingObjectField(PersistenceCapable pc,
                     int field)The replacement value of the field in the calling instance. | 
|  short | replacingShortField(PersistenceCapable pc,
                    int field)The replacement value of the field in the calling instance. | 
|  StateManager | replacingStateManager(PersistenceCapable pc,
                      StateManager sm)Replace the current value of jdoStateManager. | 
|  java.lang.String | replacingStringField(PersistenceCapable pc,
                     int field)The replacement value of the field in the calling instance. | 
|  void | setBooleanField(PersistenceCapable pc,
                int field,
                boolean currentValue,
                boolean newValue)Mark the field as modified by the user. | 
|  void | setByteField(PersistenceCapable pc,
             int field,
             byte currentValue,
             byte newValue)Mark the field as modified by the user. | 
|  void | setCharField(PersistenceCapable pc,
             int field,
             char currentValue,
             char newValue)Mark the field as modified by the user. | 
|  void | setDoubleField(PersistenceCapable pc,
               int field,
               double currentValue,
               double newValue)Mark the field as modified by the user. | 
|  void | setFloatField(PersistenceCapable pc,
              int field,
              float currentValue,
              float newValue)Mark the field as modified by the user. | 
|  void | setIntField(PersistenceCapable pc,
            int field,
            int currentValue,
            int newValue)Mark the field as modified by the user. | 
|  void | setLongField(PersistenceCapable pc,
             int field,
             long currentValue,
             long newValue)Mark the field as modified by the user. | 
|  void | setObjectField(PersistenceCapable pc,
               int field,
               java.lang.Object currentValue,
               java.lang.Object newValue)Mark the field as modified by the user. | 
|  void | setShortField(PersistenceCapable pc,
              int field,
              short currentValue,
              short newValue)Mark the field as modified by the user. | 
|  void | setStringField(PersistenceCapable pc,
               int field,
               java.lang.String currentValue,
               java.lang.String newValue)Mark the field as modified by the user. | 
| Method Detail | 
|---|
byte replacingFlags(PersistenceCapable pc)
StateManager uses this method to supply the 
 value of the flags to the PersistenceCapable instance.
pc - the calling PersistenceCapable instance
jdoFlags to be stored in the 
 PersistenceCapable instance
StateManager replacingStateManager(PersistenceCapable pc,
                                   StateManager sm)
jdoStateManager.
 
 This method is called by the PersistenceCapable whenever
 jdoReplaceStateManager is called and there is already
 an owning StateManager.  This is a security precaution
 to ensure that the owning StateManager is the only
 source of any change to its reference in the 
 PersistenceCapable.
pc - the calling PersistenceCapable instancesm - the proposed new value for the jdoStateManager
jdoStateManagerboolean isDirty(PersistenceCapable pc)
true.
Transient nontransactional instances return false.
pc - the calling PersistenceCapable instance
true if this instance has been modified in the 
 current transaction.PersistenceCapable.jdoMakeDirty(String fieldName)boolean isTransactional(PersistenceCapable pc)
true.  
 These instances include transient instances made transactional as a 
 result of being the target of a makeTransactional method 
 call; newly made persistent or deleted persistent instances; persistent 
 instances read in data store transactions; and persistent instances 
 modified in optimistic transactions.
Transient nontransactional instances return false.
pc - the calling PersistenceCapable instance
true if this instance is transactional.boolean isPersistent(PersistenceCapable pc)
true.
Transient instances return false.
pc - the calling PersistenceCapable instance
true if this instance is persistent.PersistenceManager.makePersistent(Object pc)boolean isNew(PersistenceCapable pc)
true.
 Transient instances return false.
 
pc - the calling PersistenceCapable instance
true if this instance was made persistent
 in the current transaction.PersistenceManager.makePersistent(Object pc)boolean isDeleted(PersistenceCapable pc)
true.
Transient instances return false.
pc - the calling PersistenceCapable instance
true if this instance was deleted
 in the current transaction.PersistenceManager.deletePersistent(Object pc)PersistenceManager getPersistenceManager(PersistenceCapable pc)
PersistenceManager that owns this instance.
pc - the calling PersistenceCapable instance
PersistenceManager that owns this instance
void makeDirty(PersistenceCapable pc,
               java.lang.String fieldName)
PersistenceCapable field dirty.
 The StateManager will make a copy of the field
 so it can be restored if needed later, and then mark
 the field as modified in the current transaction.
pc - the calling PersistenceCapable instancefieldName - the name of the fieldjava.lang.Object getObjectId(PersistenceCapable pc)
pc - the calling PersistenceCapable instance
java.lang.Object getTransactionalObjectId(PersistenceCapable pc)
pc - the calling PersistenceCapable instance
java.lang.Object getVersion(PersistenceCapable pc)
pc - the calling PersistenceCapable instance
boolean isLoaded(PersistenceCapable pc,
                 int field)
true if the field is cached in the calling
 instance.
pc - the calling PersistenceCapable instancefield - the field number
void preSerialize(PersistenceCapable pc)
jdoPreSerialize method prior to serialization of the
 instance.
pc - the calling PersistenceCapable instance
boolean getBooleanField(PersistenceCapable pc,
                        int field,
                        boolean currentValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
char getCharField(PersistenceCapable pc,
                  int field,
                  char currentValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
byte getByteField(PersistenceCapable pc,
                  int field,
                  byte currentValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
short getShortField(PersistenceCapable pc,
                    int field,
                    short currentValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
int getIntField(PersistenceCapable pc,
                int field,
                int currentValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
long getLongField(PersistenceCapable pc,
                  int field,
                  long currentValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
float getFloatField(PersistenceCapable pc,
                    int field,
                    float currentValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
double getDoubleField(PersistenceCapable pc,
                      int field,
                      double currentValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
java.lang.String getStringField(PersistenceCapable pc,
                                int field,
                                java.lang.String currentValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
java.lang.Object getObjectField(PersistenceCapable pc,
                                int field,
                                java.lang.Object currentValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
void setBooleanField(PersistenceCapable pc,
                     int field,
                     boolean currentValue,
                     boolean newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the proposed new value of the field
void setCharField(PersistenceCapable pc,
                  int field,
                  char currentValue,
                  char newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the proposed new value of the field
void setByteField(PersistenceCapable pc,
                  int field,
                  byte currentValue,
                  byte newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the proposed new value of the field
void setShortField(PersistenceCapable pc,
                   int field,
                   short currentValue,
                   short newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the proposed new value of the field
void setIntField(PersistenceCapable pc,
                 int field,
                 int currentValue,
                 int newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the proposed new value of the field
void setLongField(PersistenceCapable pc,
                  int field,
                  long currentValue,
                  long newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the proposed new value of the field
void setFloatField(PersistenceCapable pc,
                   int field,
                   float currentValue,
                   float newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the proposed new value of the field
void setDoubleField(PersistenceCapable pc,
                    int field,
                    double currentValue,
                    double newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the proposed new value of the field
void setStringField(PersistenceCapable pc,
                    int field,
                    java.lang.String currentValue,
                    java.lang.String newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the proposed new value of the field
void setObjectField(PersistenceCapable pc,
                    int field,
                    java.lang.Object currentValue,
                    java.lang.Object newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the proposed new value of the field
void providedBooleanField(PersistenceCapable pc,
                          int field,
                          boolean currentValue)
StateManager.
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
void providedCharField(PersistenceCapable pc,
                       int field,
                       char currentValue)
StateManager.
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
void providedByteField(PersistenceCapable pc,
                       int field,
                       byte currentValue)
StateManager.
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
void providedShortField(PersistenceCapable pc,
                        int field,
                        short currentValue)
StateManager.
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
void providedIntField(PersistenceCapable pc,
                      int field,
                      int currentValue)
StateManager.
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
void providedLongField(PersistenceCapable pc,
                       int field,
                       long currentValue)
StateManager.
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
void providedFloatField(PersistenceCapable pc,
                        int field,
                        float currentValue)
StateManager.
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
void providedDoubleField(PersistenceCapable pc,
                         int field,
                         double currentValue)
StateManager.
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
void providedStringField(PersistenceCapable pc,
                         int field,
                         java.lang.String currentValue)
StateManager.
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
void providedObjectField(PersistenceCapable pc,
                         int field,
                         java.lang.Object currentValue)
StateManager.
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the field
boolean replacingBooleanField(PersistenceCapable pc,
                              int field)
pc - the calling PersistenceCapable instancefield - the field number
char replacingCharField(PersistenceCapable pc,
                        int field)
pc - the calling PersistenceCapable instancefield - the field number
byte replacingByteField(PersistenceCapable pc,
                        int field)
pc - the calling PersistenceCapable instancefield - the field number
short replacingShortField(PersistenceCapable pc,
                          int field)
pc - the calling PersistenceCapable instancefield - the field number
int replacingIntField(PersistenceCapable pc,
                      int field)
pc - the calling PersistenceCapable instancefield - the field number
long replacingLongField(PersistenceCapable pc,
                        int field)
pc - the calling PersistenceCapable instancefield - the field number
float replacingFloatField(PersistenceCapable pc,
                          int field)
pc - the calling PersistenceCapable instancefield - the field number
double replacingDoubleField(PersistenceCapable pc,
                            int field)
pc - the calling PersistenceCapable instancefield - the field number
java.lang.String replacingStringField(PersistenceCapable pc,
                                      int field)
pc - the calling PersistenceCapable instancefield - the field number
java.lang.Object replacingObjectField(PersistenceCapable pc,
                                      int field)
pc - the calling PersistenceCapable instancefield - the field number
java.lang.Object[] replacingDetachedState(Detachable pc,
                                          java.lang.Object[] state)
pc - the calling Detachable instancestate - the current value of the detached state
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||