Java Doc for JDOStateManagerImpl.java in  » Database-ORM » JPOX » org » jpox » state » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » JPOX » org.jpox.state 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jpox.state.AbstractStateManager
      org.jpox.state.JDOStateManagerImpl

JDOStateManagerImpl
final public class JDOStateManagerImpl extends AbstractStateManager implements StateManager(Code)
Implementation of the StateManager. Implemented here as one StateManager per Object so adds on functionality particular to each object. All PersistenceCapable objects will have a StateManager when they have had communication with the PersistenceManager. They will typically always have an identity also. The exception to that is for embedded/serialised objects.

Embedded/Serialised Objects

An object that is being embedded/serialised in an owning object will NOT have an identity unless the object is subject to a makePersistent() call also. When an object is embedded/serialised and a field is changed, the field will NOT be marked as dirty (unless it is also an object in its own right with an identity). When a field is changed any owning objects are updated so that they can update their tables accordingly.

Performance and Memory

StateManagers are very performance-critical, because for each PersistentCapable object made persistent, there will be one StateManager instance, adding up to the total memory footprint of that object. In heap profiling analysis, JDOStateManagerImpls showed to consume bytes 169 per StateManager by itself and about 500 bytes per StateManager when taking PC-individual child-object (like the OID) referred by the StateManager into account. With small Java objects this can mean a substantial memory overhead and for applications using such small objects can be critical. For this reason the StateManager should always be minimal in memory consumption.
version:
   $Revision: 1.190 $


Field Summary
 booleanloadingFieldsInFetchPlan
    

Constructor Summary
public  JDOStateManagerImpl(ObjectManager om, AbstractClassMetaData cmd)
     Basic constructor.

Method Summary
public  voidaddEmbeddedOwner(org.jpox.StateManager ownerSM, int ownerFieldNumber)
     Method to register an owner StateManager with this embedded/serialised object.
public  voidaddInsertionNotifier(StateManager sm, ActivityState activityState)
     Method to add a notifier that we must contact when we have finished our insertion.
public  voidattach(boolean embedded)
     Method to attach the object managed by this StateManager.
public  ObjectattachCopy(Object obj, boolean embedded)
     Method to attach a copy of the detached persistable instance and return the (attached) copy.
public  voidchangeActivityState(ActivityState activityState, DatastoreClass table)
     Change the activity state.
public  voidcheckInheritance(FieldValues fv)
     Look to the database to determine which class this object is.
public  voidcheckManagedRelations()
     Method to check all updated managed relations in this object.
public  voidclearFields()
     Method to clear all fields of the object.
public  voidclearLoadedFlags()
     Method to clear all loaded flags on the object.
public  voidclearManagedRelations()
     Method to clear all initial values for bidirectional fields involved in "managed relationships".
public  voidclearNonPrimaryKeyFields()
     Method to clear all fields that are not part of the primary key of the object.
public  voidclearSavedFields()
     Method to clear all saved fields on the object.
public  voidcopyFieldsFromObject(PersistenceCapable pc, int[] fieldNumbers)
     Convenience method to update our object with the field values from the passed object.
public  voiddeletePersistent()
     Method to delete the object from persistence.
public  voiddetach(FetchPlanState state)
     Method to detach this object. If the object is detachable then it will be migrated to DETACHED state, otherwise will migrate to TRANSIENT.
public  ObjectdetachCopy(FetchPlanState state)
     Method to make detached copy of this instance If the object is detachable then the copy will be migrated to DETACHED state, otherwise will migrate the copy to TRANSIENT.
public  voiddisconnect()
     Disconnect the StateManager from the PersistenceManager and PC object.
protected  booleandisconnectClone(PersistenceCapable pc)
     Method to disconnect any cloned persistence capable objects from their StateManager.
public  voiddump(PrintWriter out)
     Utility to dump the contents of the StateManager.
public  voidenlistInTransaction()
     Method to enlist the managed object in the current transaction.
public  voidevict()
     Method to change the object state to evicted.
public  voidevictFromTransaction()
     Method to evict the managed object from the current transaction.
public  voidflush()
     Flushes any outstanding changes to the object to the datastore.
public  booleangetAllFieldsLoaded()
     Returns whether all fields are loaded.
public  boolean[]getDirtyFields()
     Creates a copy of the JDOStateManagerImpl.dirtyFields bitmap.
public  org.jpox.StateManager[]getEmbeddedOwners()
     Accessor for the owning StateManagers for the managed object when stored embedded.
public  ObjectgetExternalObjectId(Object obj)
     Return an object id that the user can use.
public  CachedPCgetL2CacheableObject()
     Accessor for a L2-Cacheable form of this PersistenceCapable object. This currently marks all non-relation fields as cacheable, and hence all relations will not be stored in the L2 cached object.
public  ObjectgetObjectId(PersistenceCapable pc)
     Return the object representing the JDO identity of the calling instance.
public  javax.jdo.PersistenceManagergetPersistenceManager(PersistenceCapable pc)
     Accessor for the PersistenceManager that owns this instance.
public  ObjectgetReferencedPC()
     Accessor for the referenced PC object when we are attaching or detaching.
public  RelationshipManagergetRelationshipManager()
     Accessor for the relationship manager, and create if not existing and we are managing relations.
public  ObjectgetTransactionalObjectId(PersistenceCapable pc)
     Return the object representing the JDO identity of the calling instance.
public  ObjectgetValueForExternalField(JavaTypeMapping mapping)
     Accessor for the value of an external field.
public  voidinitialiseForCachedPC(Object pc, Object id, boolean loaded, Class pcClass)
     Initialise to create a StateManager for a PersistenceCapable object, assigning the specified id to the object.
public  voidinitialiseForDetached(Object pc, Object id, Object version)
     Initialises the StateManager to manage a PersistenceCapable object in detached state.
public  voidinitialiseForEmbedded(Object pc, boolean copyPc)
     Initialises a state manager to manage a PersistenceCapable instance that will be EMBEDDED/SERIALISED into another PersistenceCapable object.
public  voidinitialiseForHollow(Object id, FieldValues fv, Class pcClass)
     Initialises a state manager to manage a hollow instance having the given object ID and the given (optional) field values.
public  voidinitialiseForHollowAppId(FieldValues fv, Class pcClass)
     Initialises a state manager to manage a HOLLOW / P_CLEAN instance having the given FieldValues.
public  voidinitialiseForHollowPreConstructed(Object id, Object pc)
     Initialises a state manager to manage the given hollow instance having the given object ID.
public  voidinitialiseForPNewToBeDeleted(Object pc)
     Initialises the StateManager to manage a PersistenceCapable object that is not persistent but is about to be deleted.
public  voidinitialiseForPersistentClean(Object id, Object pc)
     Initialises a state manager to manage the passed persistent instance having the given object ID. Used where we have retrieved a PC object from a datastore directly (not field-by-field), for example on an object datastore.
public  voidinitialiseForPersistentNew(Object pc, FieldValues preInsertChanges)
     Initialises a state manager to manage a transient instance that is becoming newly persistent.
public  voidinitialiseForTransactionalTransient(Object pc)
     Initialises a state manager to manage a Transactional Transient instance.
 voidinsertionCompleted(JDOStateManagerImpl sm)
     Method called by another StateManager when this object has registered that it needs to know when the other object has been inserted.
public  booleanisDeleting()
     Tests whether this object is being deleted.
public  booleanisDirty()
     Returns whether the object being managed is dirty.
public  booleanisInserted(int fieldNumber)
     Returns whether the field of this object is inserted in the datastore.
public  booleanisInserted(String className)
     Returns whether this object is inserted in the datastore far enough to be considered of the supplied type.
public  booleanisInserting()
     Tests whether this object is being inserted.
public  booleanisLoaded(PersistenceCapable pc, int field)
     Return true if the field is cached in the calling instance.

In the JPOX implementation of this method, isLoaded() will always return true.

public  booleanisWaitingToBeFlushedToDatastore()
     Accessor for whether the instance is newly persistent yet hasnt yet been flushed to the datastore.
public  voidloadField(int fieldNumber)
     Convenience method to load the specified field if not loaded.
public  voidloadFieldFromDatastore(int fieldNumber)
     Convenience method to load a field from the datastore.
public  voidloadFieldValues(FieldValues fv)
     Convenience method to load the passed field values.
public  voidloadFieldsInFetchPlan(FetchPlanState state)
     Method to load all unloaded fields in the FetchPlan.
protected  voidloadSpecifiedFields(int[] fieldNumbers)
     Fetch the specified fields from the database.
public  voidloadUnloadedFields()
     Fetch from the database all fields that are not currently loaded regardless of whether they are in the current fetch group or not.
public  voidloadUnloadedFieldsInFetchPlan()
     Fetchs from the database all fields that are not currently loaded and that are in the current fetch group.
public  voidloadUnloadedFieldsOfClassInFetchPlan(FetchPlan fetchPlan)
     Fetchs from the database all fields in the actual fetch plan.
public  voidlocate()
     Locate the object in the datastore.
public  voidmakeDirty(int field)
     Marks the given field dirty.
Parameters:
  field - The no of field to mark as dirty.
public  voidmakeDirty(PersistenceCapable pc, String fieldName)
     Mark the associated PersistenceCapable field dirty.
public  voidmakeNontransactional()
     Method to change the object state to nontransactional.
public  voidmakePersistent()
     Method to make the object persistent.
public  voidmakePersistentTransactionalTransient()
     Makes Transactional Transient instances persistent.
public  voidmakeTransactional()
     Method to change the object state to transactional.
public  voidmakeTransient(FetchPlanState state)
     Method to change the object state to transient.
public  voidnullifyFields()
    
public  voidpostCommit(org.jpox.Transaction tx)
    
public  voidpreBegin(org.jpox.Transaction tx)
     Method invoked just before a transaction starts for the ObjectManager managing us.
public  voidpreRollback(org.jpox.Transaction tx)
     This method is invoked just before a rollback is performed in a Transaction involving the PersistenceCapable managed by this StateManager.
public  voidpreSerialize(PersistenceCapable pc)
     Guarantee that the serializable transactional and persistent fields are loaded into the instance.
public  voidprocessManagedRelations()
     Method to process all updated managed relations in this object.
public  ObjectprovideField(int fieldNumber)
     Method to return the current value of a particular field.
public  voidprovideFields(int fieldNumbers, FieldManager fm)
     Called from the StoreManager after StoreManager.update() is called to obtain updated values from the PersistenceCapable associated with this StateManager.
Parameters:
  fieldNumbers - An array of field numbers to be updated by the Store
Parameters:
  fm - The updated values are stored in this object.
public  voidrefresh()
     Method to refresh the object.
public  voidrefreshFieldsInFetchPlan()
     Refreshes from the database all fields in fetch plan.
public  voidrefreshLoadedFields()
     Refreshes from the database all fields currently loaded.
public  voidregisterTransactional()
    
public  voidremoveEmbeddedOwner(StateManager ownerSM, int ownerFieldNumber)
     Method to remove an owner StateManager from this embedded/serialised objects owners list.
public  voidreplaceAllLoadedSCOFieldsWithValues()
     Method to replace all loaded SCO fields that have wrappers with their value.
public  voidreplaceAllLoadedSCOFieldsWithWrappers()
     Method to replace all loaded SCO fields with wrappers.
public  voidreplaceField(int fieldNumber, Object value, boolean makeDirty)
     Method to change the value of a particular field.
public  voidreplaceFieldValue(int fieldNumber, Object newValue)
     Convenience method to change the value of a field that is assumed loaded. Will mark the object/field as dirty if it isnt previously.
public  voidreplaceFields(int fieldNumbers, FieldManager fm, boolean replaceWhenDirty)
     Called from the StoreManager to refresh data in the PersistenceCapable object associated with this StateManager.
Parameters:
  fieldNumbers - An array of field numbers to be refreshed by the Store
Parameters:
  fm - The updated values are stored in this object.
public  voidreplaceFields(int fieldNumbers, FieldManager fm)
     Called from the StoreManager to refresh data in the PersistenceCapable object associated with this StateManager.
Parameters:
  fieldNumbers - An array of field numbers to be refreshed by the Store
Parameters:
  fm - The updated values are stored in this object.
public  voidreplaceManagedPC(PersistenceCapable pc)
     Method that replaces the PC managed by this StateManager to be the supplied object. This happens when we want to get an object for an id and create a Hollow object, and then validate against the datastore.
public  voidreplaceNonLoadedFields(int fieldNumbers, FieldManager fm)
     Called from the StoreManager to refresh data in the PersistenceCapable object associated with this StateManager.
public  Object[]replacingDetachedState(Detachable pc, Object[] currentState)
     Method to update the "detached state" in the detached object to obtain the "detached state" from the detached object, or to reset it (to null).
public  bytereplacingFlags(PersistenceCapable pc)
     The StateManager uses this method to supply the value of jdoFlags to the associated PersistenceCapable instance.
public  StateManagerreplacingStateManager(PersistenceCapable pc, StateManager sm)
     Replace the current value of jdoStateManager.

This method is called by the PersistenceCapable whenever jdoReplaceStateManager is called and there is already an owning StateManager.

public  voidresetDetachState()
     Convenience method to reset the detached state in the current object.
public  voidrestoreFields()
     Method to restore all fields of the object.
public  voidretrieve(boolean fgOnly)
     Method to retrieve the object.
public  voidretrieve(FetchPlan fetchPlan)
     Method to retrieve the object.
public  voidretrieveDetachState(org.jpox.StateManager sm)
    
public  voidrunReachability(Set reachables)
     Method to mark an object for reachability.
public  voidsaveFields()
     Method to save all fields of the object.
public  voidsetBooleanField(PersistenceCapable pc, int field, boolean currentValue, boolean newValue)
     This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
public  voidsetByteField(PersistenceCapable pc, int field, byte currentValue, byte newValue)
     This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
public  voidsetCharField(PersistenceCapable pc, int field, char currentValue, char newValue)
     This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
public  voidsetDoubleField(PersistenceCapable pc, int field, double currentValue, double newValue)
     This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
public  voidsetExternalFieldValueForMapping(JavaTypeMapping mapping, Object value)
    
public  voidsetFloatField(PersistenceCapable pc, int field, float currentValue, float newValue)
     This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
public  voidsetIntField(PersistenceCapable pc, int field, int currentValue, int newValue)
     This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
public  voidsetLongField(PersistenceCapable pc, int field, long currentValue, long newValue)
     This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
public  voidsetObjectField(PersistenceCapable pc, int field, Object currentValue, Object newValue)
     This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
public  voidsetPostStoreNewObjectId(Object id)
     If the id is obtained after inserting the object into the database, set new a new id for persistent classes (for example, increment).
public  voidsetShortField(PersistenceCapable pc, int field, short currentValue, short newValue)
     This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
public  voidsetStoringPC()
     Method to set the storing PC flag.
public  voidsetStringField(PersistenceCapable pc, int field, String currentValue, String newValue)
     This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
public  voidunloadField(String fieldName)
     Convenience method to unload a field/property.
public  voidunloadNonFetchPlanFields()
     Method that will unload all fields that are not in the FetchPlan.
public  voidunsetStoringPC()
     Method to unset the storing PC flag.
public  ObjectunwrapSCOField(int fieldNumber, Object value, boolean replaceFieldIfChanged)
     Method to unwrap a SCO field (if it is wrapped currently).
public  voidupdateFieldAfterInsert(Object pc, int fieldNumber)
     Marks the given field as being required to be updated when the specified object has been inserted.
public  voidvalidate()
     Validates whether the persistence capable instance exists in the datastore.
public  ObjectwrapSCOField(int fieldNumber, Object value, boolean forInsert, boolean forUpdate, boolean replaceFieldIfChanged)
     Method to create a new SCO wrapper for the specified field.

Field Detail
loadingFieldsInFetchPlan
boolean loadingFieldsInFetchPlan(Code)




Constructor Detail
JDOStateManagerImpl
public JDOStateManagerImpl(ObjectManager om, AbstractClassMetaData cmd)(Code)
Basic constructor. Delegates to the superclass.
Parameters:
  om - The ObjectManager
Parameters:
  cmd - the metadata for the class.




Method Detail
addEmbeddedOwner
public void addEmbeddedOwner(org.jpox.StateManager ownerSM, int ownerFieldNumber)(Code)
Method to register an owner StateManager with this embedded/serialised object.
Parameters:
  ownerSM - The owning State Manager.
Parameters:
  ownerFieldNumber - The field number in the owner that the embedded/serialised object is stored as



addInsertionNotifier
public void addInsertionNotifier(StateManager sm, ActivityState activityState)(Code)
Method to add a notifier that we must contact when we have finished our insertion.
Parameters:
  sm - the state manager
Parameters:
  activityState - the ActivityState (unused)



attach
public void attach(boolean embedded)(Code)
Method to attach the object managed by this StateManager.
Parameters:
  embedded - Whether it is embedded
since:
   1.2



attachCopy
public Object attachCopy(Object obj, boolean embedded)(Code)
Method to attach a copy of the detached persistable instance and return the (attached) copy.
Parameters:
  obj - the detached persistable instance to be attached
Parameters:
  embedded - Whether the object is stored embedded/serialised in another object The attached copy
since:
   1.1



changeActivityState
public void changeActivityState(ActivityState activityState, DatastoreClass table)(Code)
Change the activity state.
Parameters:
  activityState - the new state
Parameters:
  table - Datastore class that has just been processed



checkInheritance
public void checkInheritance(FieldValues fv)(Code)
Look to the database to determine which class this object is. This parameter is a hint. Set false, if it's already determined the correct pcClass for this pc "object" in a certain level in the hierarchy. Set to true and it will look to the database.
Parameters:
  fv - the initial field values of the object.



checkManagedRelations
public void checkManagedRelations()(Code)
Method to check all updated managed relations in this object.



clearFields
public void clearFields()(Code)
Method to clear all fields of the object.



clearLoadedFlags
public void clearLoadedFlags()(Code)
Method to clear all loaded flags on the object. Note that the contract of this method implies, especially for object database backends, that the memory form of the object is outdated. Thus, for features like implicit saving of dirty object subgraphs should be switched off for this PC, even if the object actually looks like being dirty (because it is being changed to null values).



clearManagedRelations
public void clearManagedRelations()(Code)
Method to clear all initial values for bidirectional fields involved in "managed relationships".



clearNonPrimaryKeyFields
public void clearNonPrimaryKeyFields()(Code)
Method to clear all fields that are not part of the primary key of the object.



clearSavedFields
public void clearSavedFields()(Code)
Method to clear all saved fields on the object.



copyFieldsFromObject
public void copyFieldsFromObject(PersistenceCapable pc, int[] fieldNumbers)(Code)
Convenience method to update our object with the field values from the passed object. Objects need to be of the same type, and the other object should not have a StateManager.
Parameters:
  pc - The object that we should copy fields from



deletePersistent
public void deletePersistent()(Code)
Method to delete the object from persistence.



detach
public void detach(FetchPlanState state)(Code)
Method to detach this object. If the object is detachable then it will be migrated to DETACHED state, otherwise will migrate to TRANSIENT. Used by "DetachAllOnCommit".
Parameters:
  state - State for the detachment process



detachCopy
public Object detachCopy(FetchPlanState state)(Code)
Method to make detached copy of this instance If the object is detachable then the copy will be migrated to DETACHED state, otherwise will migrate the copy to TRANSIENT. Used by "ObjectManager.detachObjectCopy()".
Parameters:
  state - State for the detachment process the detached PersistenceCapable instance
since:
   1.1



disconnect
public void disconnect()(Code)
Disconnect the StateManager from the PersistenceManager and PC object.



disconnectClone
protected boolean disconnectClone(PersistenceCapable pc)(Code)
Method to disconnect any cloned persistence capable objects from their StateManager.
Parameters:
  pc - The PersistenceCapable object Whether the object was disconnected.



dump
public void dump(PrintWriter out)(Code)
Utility to dump the contents of the StateManager.
Parameters:
  out - PrintWriter to dump to



enlistInTransaction
public void enlistInTransaction()(Code)
Method to enlist the managed object in the current transaction.



evict
public void evict()(Code)
Method to change the object state to evicted.



evictFromTransaction
public void evictFromTransaction()(Code)
Method to evict the managed object from the current transaction.



flush
public void flush()(Code)
Flushes any outstanding changes to the object to the datastore. This will process :-
  • Any objects that have been marked as provisionally persistent yet havent been flushed to the datastore.
  • Any objects that have been marked as provisionally deleted yet havent been flushed to the datastore.
  • Any fields that have been updated.



getAllFieldsLoaded
public boolean getAllFieldsLoaded()(Code)
Returns whether all fields are loaded. Returns true if all fields are loaded.



getDirtyFields
public boolean[] getDirtyFields()(Code)
Creates a copy of the JDOStateManagerImpl.dirtyFields bitmap. a copy of the JDOStateManagerImpl.dirtyFields bitmap.



getEmbeddedOwners
public org.jpox.StateManager[] getEmbeddedOwners()(Code)
Accessor for the owning StateManagers for the managed object when stored embedded. Should really only have a single owner but users could, in principle, assign it to multiple. StateManagers owning this embedded object.



getExternalObjectId
public Object getExternalObjectId(Object obj)(Code)
Return an object id that the user can use.
Parameters:
  obj - the PersistenceCapable object the object id



getL2CacheableObject
public CachedPC getL2CacheableObject()(Code)
Accessor for a L2-Cacheable form of this PersistenceCapable object. This currently marks all non-relation fields as cacheable, and hence all relations will not be stored in the L2 cached object. See CORE-3215. The L2 cacheable object



getObjectId
public Object getObjectId(PersistenceCapable pc)(Code)
Return the object representing the JDO identity of the calling instance. According to the JDO specification, if the JDO identity is being changed in the current transaction, this method returns the JDO identify as of the beginning of the transaction.
Parameters:
  pc - the calling PersistenceCapable instance the object representing the JDO identity of the calling instance



getPersistenceManager
public javax.jdo.PersistenceManager getPersistenceManager(PersistenceCapable pc)(Code)
Accessor for the PersistenceManager that owns this instance.
Parameters:
  pc - The PersistenceCapable instance The PersistenceManager that owns this instance



getReferencedPC
public Object getReferencedPC()(Code)
Accessor for the referenced PC object when we are attaching or detaching. When attaching and this is the detached object this returns the newly attached object. When attaching and this is the newly attached object this returns the detached object. When detaching and this is the newly detached object this returns the attached object. When detaching and this is the attached object this returns the newly detached object. The referenced object (or null).



getRelationshipManager
public RelationshipManager getRelationshipManager()(Code)
Accessor for the relationship manager, and create if not existing and we are managing relations. The Relationship manager



getTransactionalObjectId
public Object getTransactionalObjectId(PersistenceCapable pc)(Code)
Return the object representing the JDO identity of the calling instance. If the JDO identity is being changed in the current transaction, this method returns the current identity as changed in the transaction.
Parameters:
  pc - the calling PersistenceCapable instance the object representing the JDO identity of the calling instance



getValueForExternalField
public Object getValueForExternalField(JavaTypeMapping mapping)(Code)
Accessor for the value of an external field. This is used when inserting this object so that we can insert the external field values too.
Parameters:
  mapping - The external field mapping The value for this mapping



initialiseForCachedPC
public void initialiseForCachedPC(Object pc, Object id, boolean loaded, Class pcClass)(Code)
Initialise to create a StateManager for a PersistenceCapable object, assigning the specified id to the object. This is used when getting objects out of the L2 Cache, where they have no StateManager assigned, and returning them as associated with a particular PM.
Parameters:
  pc - The PersistenceCapable object
Parameters:
  id - Id to assign to the PersistenceCapable object
Parameters:
  loaded - The list of loaded fields (when put in the cache)
Parameters:
  pcClass - Class of the object that this will manage the state for



initialiseForDetached
public void initialiseForDetached(Object pc, Object id, Object version)(Code)
Initialises the StateManager to manage a PersistenceCapable object in detached state.
Parameters:
  pc - the detach object.
Parameters:
  id - the identity of the object.
Parameters:
  version - the detached version
since:
   1.1



initialiseForEmbedded
public void initialiseForEmbedded(Object pc, boolean copyPc)(Code)
Initialises a state manager to manage a PersistenceCapable instance that will be EMBEDDED/SERIALISED into another PersistenceCapable object. The instance will not be assigned an identity in the process since it is a SCO.
Parameters:
  pc - The PersistenceCapable to manage (see copyPc also)
Parameters:
  copyPc - Whether the SM should manage a copy of the passed PC or that one



initialiseForHollow
public void initialiseForHollow(Object id, FieldValues fv, Class pcClass)(Code)
Initialises a state manager to manage a hollow instance having the given object ID and the given (optional) field values. This constructor is used for creating new instances of existing persistent objects, and consequently shouldnt be used when the StoreManager controls the creation of such objects (such as in an ODBMS).
Parameters:
  id - the JDO identity of the object.
Parameters:
  fv - the initial field values of the object (optional)
Parameters:
  pcClass - Class of the object that this will manage the state for



initialiseForHollowAppId
public void initialiseForHollowAppId(FieldValues fv, Class pcClass)(Code)
Initialises a state manager to manage a HOLLOW / P_CLEAN instance having the given FieldValues. This constructor is used for creating new instances of existing persistent objects using application identity, and consequently shouldnt be used when the StoreManager controls the creation of such objects (such as in an ODBMS).
Parameters:
  fv - the initial field values of the object.
Parameters:
  pcClass - Class of the object that this will manage the state for



initialiseForHollowPreConstructed
public void initialiseForHollowPreConstructed(Object id, Object pc)(Code)
Initialises a state manager to manage the given hollow instance having the given object ID. Unlike the JDOStateManagerImpl.initialiseForHollow method, this method does not create a new instance and instead takes a pre-constructed instance.
Parameters:
  id - the identity of the object.
Parameters:
  pc - the object to be managed.



initialiseForPNewToBeDeleted
public void initialiseForPNewToBeDeleted(Object pc)(Code)
Initialises the StateManager to manage a PersistenceCapable object that is not persistent but is about to be deleted.
Parameters:
  pc - the object to delete
since:
   1.2



initialiseForPersistentClean
public void initialiseForPersistentClean(Object id, Object pc)(Code)
Initialises a state manager to manage the passed persistent instance having the given object ID. Used where we have retrieved a PC object from a datastore directly (not field-by-field), for example on an object datastore. This initialiser will not add StateManagers to all related PCs. This must be done by any calling process. This simply adds the StateManager to the specified object and records the id, setting all fields of the object as loaded.
Parameters:
  id - the identity of the object.
Parameters:
  pc - The object to be managed



initialiseForPersistentNew
public void initialiseForPersistentNew(Object pc, FieldValues preInsertChanges)(Code)
Initialises a state manager to manage a transient instance that is becoming newly persistent. A new object ID for the instance is obtained from the store manager and the object is inserted in the data store.

This constructor is used for assigning state managers to existing instances that are transitioning to a persistent state.
Parameters:
  pc - the instance being make persistent.
Parameters:
  preInsertChanges - Any changes to make before inserting




initialiseForTransactionalTransient
public void initialiseForTransactionalTransient(Object pc)(Code)
Initialises a state manager to manage a Transactional Transient instance. A new object ID for the instance is obtained from the store manager and the object is inserted in the data store.

This constructor is used for assigning state managers to Transient instances that are transitioning to a transient clean state.
Parameters:
  pc - the instance being make persistent.




insertionCompleted
void insertionCompleted(JDOStateManagerImpl sm)(Code)
Method called by another StateManager when this object has registered that it needs to know when the other object has been inserted.
Parameters:
  sm - State Manager of the other object that has just been inserted



isDeleting
public boolean isDeleting()(Code)
Tests whether this object is being deleted. true if this instance is being deleted.



isDirty
public boolean isDirty()(Code)
Returns whether the object being managed is dirty. whether at least one field is dirty by checking the dirty flag.



isInserted
public boolean isInserted(int fieldNumber)(Code)
Returns whether the field of this object is inserted in the datastore. Only applies during the makePersistent process.
Parameters:
  fieldNumber - Number of the field (-1 => datastore identity, if used) Whether it is inserted to the level of this field



isInserted
public boolean isInserted(String className)(Code)
Returns whether this object is inserted in the datastore far enough to be considered of the supplied type. For example if we have base class A, B extends A and this object is a B, and we pass in A here then this returns whether the A part of the object is now inserted.
Parameters:
  className - Name of class that we want to check the insertion level for. Whether the object is inserted in the datastore to this level



isInserting
public boolean isInserting()(Code)
Tests whether this object is being inserted. true if this instance is inserting.



isLoaded
public boolean isLoaded(PersistenceCapable pc, int field)(Code)
Return true if the field is cached in the calling instance.

In the JPOX implementation of this method, isLoaded() will always return true. If the field is not loaded, it will be loaded as a side effect of the call to this method. If it is in the default fetch group, the default fetch group, including this field, will be loaded.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the absolute field number always returns true (this implementation)




isWaitingToBeFlushedToDatastore
public boolean isWaitingToBeFlushedToDatastore()(Code)
Accessor for whether the instance is newly persistent yet hasnt yet been flushed to the datastore. Whether not yet flushed to the datastore



loadField
public void loadField(int fieldNumber)(Code)
Convenience method to load the specified field if not loaded.
Parameters:
  fieldNumber - Absolute field number



loadFieldFromDatastore
public void loadFieldFromDatastore(int fieldNumber)(Code)
Convenience method to load a field from the datastore. Used in attaching fields and checking their old values (so we dont want any postLoad method being called). TODO Merge this with one of the loadXXXFields methods.
Parameters:
  fieldNumber - The field number.



loadFieldValues
public void loadFieldValues(FieldValues fv)(Code)
Convenience method to load the passed field values. Loads the fields using any required fetch plan and calls jdoPostLoad() as appropriate.
Parameters:
  fv - Field Values to load (including any fetch plan to use when loading)



loadFieldsInFetchPlan
public void loadFieldsInFetchPlan(FetchPlanState state)(Code)
Method to load all unloaded fields in the FetchPlan. Recurses through the FetchPlan objects and loads fields of sub-objects where needed. Used as a precursor to detaching objects at commit since fields can't be loaded during the postCommit phase when the detach actually happens.
Parameters:
  state - The FetchPlan state



loadSpecifiedFields
protected void loadSpecifiedFields(int[] fieldNumbers)(Code)
Fetch the specified fields from the database.
Parameters:
  fieldNumbers - the numbers of the field(s) to fetch.



loadUnloadedFields
public void loadUnloadedFields()(Code)
Fetch from the database all fields that are not currently loaded regardless of whether they are in the current fetch group or not. Called by lifecycle transitions.
since:
   1.1



loadUnloadedFieldsInFetchPlan
public void loadUnloadedFieldsInFetchPlan()(Code)
Fetchs from the database all fields that are not currently loaded and that are in the current fetch group. Called by lifecycle transitions.
since:
   1.1



loadUnloadedFieldsOfClassInFetchPlan
public void loadUnloadedFieldsOfClassInFetchPlan(FetchPlan fetchPlan)(Code)
Fetchs from the database all fields in the actual fetch plan. Called by life-cycle transitions.
since:
   1.1



locate
public void locate()(Code)
Locate the object in the datastore.
throws:
  JPOXObjectNotFoundException - if the object doesnt exist.



makeDirty
public void makeDirty(int field)(Code)
Marks the given field dirty.
Parameters:
  field - The no of field to mark as dirty.



makeDirty
public void makeDirty(PersistenceCapable pc, String fieldName)(Code)
Mark the associated PersistenceCapable field dirty.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  fieldName - the name of the field



makeNontransactional
public void makeNontransactional()(Code)
Method to change the object state to nontransactional.



makePersistent
public void makePersistent()(Code)
Method to make the object persistent.



makePersistentTransactionalTransient
public void makePersistentTransactionalTransient()(Code)
Makes Transactional Transient instances persistent.



makeTransactional
public void makeTransactional()(Code)
Method to change the object state to transactional.



makeTransient
public void makeTransient(FetchPlanState state)(Code)
Method to change the object state to transient.
Parameters:
  state - Object containing the state of any fetchplan processing



nullifyFields
public void nullifyFields()(Code)
Nullify fields with reference to PersistenceCapable or SCO instances



postCommit
public void postCommit(org.jpox.Transaction tx)(Code)
This method is invoked just after a commit is performed in a Transaction involving the PersistenceCapable managed by this StateManager
Parameters:
  tx - The Transaction



preBegin
public void preBegin(org.jpox.Transaction tx)(Code)
Method invoked just before a transaction starts for the ObjectManager managing us.
Parameters:
  tx - The transaction



preRollback
public void preRollback(org.jpox.Transaction tx)(Code)
This method is invoked just before a rollback is performed in a Transaction involving the PersistenceCapable managed by this StateManager.
Parameters:
  tx - The Transaction been rolled back



preSerialize
public void preSerialize(PersistenceCapable pc)(Code)
Guarantee that the serializable transactional and persistent fields are loaded into the instance. This method is called by the generated jdoPreSerialize method prior to serialization of the instance.
Parameters:
  pc - the calling PersistenceCapable instance



processManagedRelations
public void processManagedRelations()(Code)
Method to process all updated managed relations in this object.



provideField
public Object provideField(int fieldNumber)(Code)
Method to return the current value of a particular field.
Parameters:
  fieldNumber - Number of field The value of the field



provideFields
public void provideFields(int fieldNumbers, FieldManager fm)(Code)
Called from the StoreManager after StoreManager.update() is called to obtain updated values from the PersistenceCapable associated with this StateManager.
Parameters:
  fieldNumbers - An array of field numbers to be updated by the Store
Parameters:
  fm - The updated values are stored in this object. This object is only validfor the duration of this call.



refresh
public void refresh()(Code)
Method to refresh the object.



refreshFieldsInFetchPlan
public void refreshFieldsInFetchPlan()(Code)
Refreshes from the database all fields in fetch plan. Called by life-cycle transitions when the object undergoes a "transitionRefresh".



refreshLoadedFields
public void refreshLoadedFields()(Code)
Refreshes from the database all fields currently loaded. Called by life-cycle transitions when making transactional or reading fields.



registerTransactional
public void registerTransactional()(Code)
Registers the pc class in the cache



removeEmbeddedOwner
public void removeEmbeddedOwner(StateManager ownerSM, int ownerFieldNumber)(Code)
Method to remove an owner StateManager from this embedded/serialised objects owners list.
Parameters:
  ownerSM - The owner to remove
Parameters:
  ownerFieldNumber - The field in the owner where this object is stored



replaceAllLoadedSCOFieldsWithValues
public void replaceAllLoadedSCOFieldsWithValues()(Code)
Method to replace all loaded SCO fields that have wrappers with their value. If the loaded field doesnt have a SCO wrapper nothing happens to that field.



replaceAllLoadedSCOFieldsWithWrappers
public void replaceAllLoadedSCOFieldsWithWrappers()(Code)
Method to replace all loaded SCO fields with wrappers. If the loaded field already uses a SCO wrapper nothing happens to that field.



replaceField
public void replaceField(int fieldNumber, Object value, boolean makeDirty)(Code)
Method to change the value of a particular field.
Parameters:
  fieldNumber - Number of field
Parameters:
  value - New value
Parameters:
  makeDirty - Whether to make the field dirty when replacing it



replaceFieldValue
public void replaceFieldValue(int fieldNumber, Object newValue)(Code)
Convenience method to change the value of a field that is assumed loaded. Will mark the object/field as dirty if it isnt previously. If the object is deleted then does nothing. Only for use in management of relations.
Parameters:
  fieldNumber - Number of field
Parameters:
  newValue - The new value



replaceFields
public void replaceFields(int fieldNumbers, FieldManager fm, boolean replaceWhenDirty)(Code)
Called from the StoreManager to refresh data in the PersistenceCapable object associated with this StateManager.
Parameters:
  fieldNumbers - An array of field numbers to be refreshed by the Store
Parameters:
  fm - The updated values are stored in this object. This object is only validfor the duration of this call.
Parameters:
  replaceWhenDirty - Whether to replace the fields when they are dirty here



replaceFields
public void replaceFields(int fieldNumbers, FieldManager fm)(Code)
Called from the StoreManager to refresh data in the PersistenceCapable object associated with this StateManager.
Parameters:
  fieldNumbers - An array of field numbers to be refreshed by the Store
Parameters:
  fm - The updated values are stored in this object. This object is only validfor the duration of this call.



replaceManagedPC
public void replaceManagedPC(PersistenceCapable pc)(Code)
Method that replaces the PC managed by this StateManager to be the supplied object. This happens when we want to get an object for an id and create a Hollow object, and then validate against the datastore. This validation can pull in a new object graph from the datastore (e.g for DB4O)
Parameters:
  pc - The PersistenceCapable to use



replaceNonLoadedFields
public void replaceNonLoadedFields(int fieldNumbers, FieldManager fm)(Code)
Called from the StoreManager to refresh data in the PersistenceCapable object associated with this StateManager. Only not loaded fields are refreshed
Parameters:
  fieldNumbers - An array of field numbers to be refreshed by the Store
Parameters:
  fm - The updated values are stored in this object. This object is only validfor the duration of this call.



replacingDetachedState
public Object[] replacingDetachedState(Detachable pc, Object[] currentState)(Code)
Method to update the "detached state" in the detached object to obtain the "detached state" from the detached object, or to reset it (to null).
Parameters:
  pc - The PersistenceCapable beind updated
Parameters:
  currentState - The current state values The detached state to assign to the object



replacingFlags
public byte replacingFlags(PersistenceCapable pc)(Code)
The StateManager uses this method to supply the value of jdoFlags to the associated PersistenceCapable instance.
Parameters:
  pc - the calling PersistenceCapable instance the value of jdoFlags to be stored in the PersistenceCapable instance



replacingStateManager
public StateManager replacingStateManager(PersistenceCapable pc, StateManager sm)(Code)
Replace the current value of 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.

the new value for the jdoStateManager
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  sm - the proposed new value for the jdoStateManager



resetDetachState
public void resetDetachState()(Code)
Convenience method to reset the detached state in the current object.



restoreFields
public void restoreFields()(Code)
Method to restore all fields of the object.



retrieve
public void retrieve(boolean fgOnly)(Code)
Method to retrieve the object.
Parameters:
  fgOnly - Only load the current fetch group fields



retrieve
public void retrieve(FetchPlan fetchPlan)(Code)
Method to retrieve the object.
Parameters:
  fetchPlan - the fetch plan to load fields



retrieveDetachState
public void retrieveDetachState(org.jpox.StateManager sm)(Code)
Convenience method to retrieve the detach state from the passed State Manager's object
Parameters:
  sm - The State Manager



runReachability
public void runReachability(Set reachables)(Code)
Method to mark an object for reachability. Provides the basis for "persistence-by-reachability", but run at commit time only. The reachability algorithm is also run at makePersistent, but directly via InsertRequest.
Parameters:
  reachables - List of object ids currently logged as reachable



saveFields
public void saveFields()(Code)
Method to save all fields of the object.



setBooleanField
public void setBooleanField(PersistenceCapable pc, int field, boolean currentValue, boolean newValue)(Code)
This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field
Parameters:
  newValue - the new value for the field



setByteField
public void setByteField(PersistenceCapable pc, int field, byte currentValue, byte newValue)(Code)
This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field
Parameters:
  newValue - the new value for the field



setCharField
public void setCharField(PersistenceCapable pc, int field, char currentValue, char newValue)(Code)
This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field
Parameters:
  newValue - the new value for the field



setDoubleField
public void setDoubleField(PersistenceCapable pc, int field, double currentValue, double newValue)(Code)
This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field
Parameters:
  newValue - the new value for the field



setExternalFieldValueForMapping
public void setExternalFieldValueForMapping(JavaTypeMapping mapping, Object value)(Code)
Method to set the value for an external field stored against this object
Parameters:
  mapping - The mapping for the (external) field
Parameters:
  value - The value that this field has



setFloatField
public void setFloatField(PersistenceCapable pc, int field, float currentValue, float newValue)(Code)
This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field
Parameters:
  newValue - the new value for the field



setIntField
public void setIntField(PersistenceCapable pc, int field, int currentValue, int newValue)(Code)
This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field
Parameters:
  newValue - the new value for the field



setLongField
public void setLongField(PersistenceCapable pc, int field, long currentValue, long newValue)(Code)
This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field
Parameters:
  newValue - the new value for the field



setObjectField
public void setObjectField(PersistenceCapable pc, int field, Object currentValue, Object newValue)(Code)
This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field
Parameters:
  newValue - the new value for the field



setPostStoreNewObjectId
public void setPostStoreNewObjectId(Object id)(Code)
If the id is obtained after inserting the object into the database, set new a new id for persistent classes (for example, increment).
Parameters:
  id - the id received from the datastore



setShortField
public void setShortField(PersistenceCapable pc, int field, short currentValue, short newValue)(Code)
This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field
Parameters:
  newValue - the new value for the field



setStoringPC
public void setStoringPC()(Code)
Method to set the storing PC flag.



setStringField
public void setStringField(PersistenceCapable pc, int field, String currentValue, String newValue)(Code)
This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field
Parameters:
  newValue - the new value for the field



unloadField
public void unloadField(String fieldName)(Code)
Convenience method to unload a field/property.
Parameters:
  fieldName - Name of the field/property
throws:
  JPOXUserException - if the object managed by this StateManager is embedded



unloadNonFetchPlanFields
public void unloadNonFetchPlanFields()(Code)
Method that will unload all fields that are not in the FetchPlan. This is typically for use when the instance is being refreshed.
since:
   1.2



unsetStoringPC
public void unsetStoringPC()(Code)
Method to unset the storing PC flag.



unwrapSCOField
public Object unwrapSCOField(int fieldNumber, Object value, boolean replaceFieldIfChanged)(Code)
Method to unwrap a SCO field (if it is wrapped currently). If the field is not a SCO field will just return the value. If "replaceFieldIfChanged" is set, we replace the value in the object with the unwrapped value.
Parameters:
  fieldNumber - The field number
Parameters:
  value - The value for the field
Parameters:
  replaceFieldIfChanged - Whether to replace the field value in the object if unwrapping the value The unwrapped field value



updateFieldAfterInsert
public void updateFieldAfterInsert(Object pc, int fieldNumber)(Code)
Marks the given field as being required to be updated when the specified object has been inserted.
Parameters:
  pc - The Persistable object
Parameters:
  fieldNumber - Number of the field.



validate
public void validate()(Code)
Validates whether the persistence capable instance exists in the datastore. If the instance doesn't exist in the datastore, this method will fail raising a JPOXObjectNotFoundException. If the object is transactional then does nothing. If the object has unloaded (non-SCO, non-PK) fetch plan fields then fetches them. Else it checks the existence of the object in the datastore.



wrapSCOField
public Object wrapSCOField(int fieldNumber, Object value, boolean forInsert, boolean forUpdate, boolean replaceFieldIfChanged)(Code)
Method to create a new SCO wrapper for the specified field. If the field is not a SCO field will just return the value.
Parameters:
  fieldNumber - The field number
Parameters:
  value - The value to initialise the wrapper with (if any)
Parameters:
  forInsert - Whether the creation of any wrapper should insert this value into the datastore
Parameters:
  forUpdate - Whether the creation of any wrapper should update the datastore with this value
Parameters:
  replaceFieldIfChanged - Whether to replace the field in the object if wrapping the value The wrapper (or original value if not wrappable)



Fields inherited from org.jpox.state.AbstractStateManager
final protected static Localiser LOCALISER(Code)(Java Doc)
protected AbstractClassMetaData cmd(Code)(Java Doc)
protected FieldManager currFM(Code)(Java Doc)
protected Object currFMmonitor(Code)(Java Doc)
protected boolean dirty(Code)(Java Doc)
protected boolean[] dirtyFields(Code)(Java Doc)
protected boolean[] loadedFields(Code)(Java Doc)
protected FetchPlan.FetchPlanForClass myFP(Code)(Java Doc)
protected Object myID(Code)(Java Doc)
protected Object myInternalID(Code)(Java Doc)
protected LifeCycleState myLC(Code)(Java Doc)
protected ObjectManager myOM(Code)(Java Doc)
protected PersistenceCapable myPC(Code)(Java Doc)
protected Object myVersion(Code)(Java Doc)
protected int pcObjectType(Code)(Java Doc)
protected boolean restoreValues(Code)(Java Doc)
protected Object transactionalVersion(Code)(Java Doc)

Methods inherited from org.jpox.state.AbstractStateManager
protected void clearDirtyFlags()(Code)(Java Doc)
protected void clearDirtyFlags(int[] fields)(Code)(Java Doc)
protected static void clearFlags(boolean[] flags)(Code)(Java Doc)
protected static void clearFlags(boolean[] flags, int[] fields)(Code)(Java Doc)
abstract protected boolean disconnectClone(PersistenceCapable pc)(Code)(Java Doc)
protected static boolean equals(Object o1, Object o2)(Code)(Java Doc)
protected int[] getAllFieldNumbers()(Code)(Java Doc)
public boolean getBooleanField(PersistenceCapable pc, int field, boolean currentValue)(Code)(Java Doc)
public byte getByteField(PersistenceCapable pc, int field, byte currentValue)(Code)(Java Doc)
protected CallbackHandler getCallbackHandler()(Code)(Java Doc)
public char getCharField(PersistenceCapable pc, int field, char currentValue)(Code)(Java Doc)
public AbstractClassMetaData getClassMetaData()(Code)(Java Doc)
public String[] getDirtyFieldNames()(Code)(Java Doc)
public int[] getDirtyFieldNumbers()(Code)(Java Doc)
public double getDoubleField(PersistenceCapable pc, int field, double currentValue)(Code)(Java Doc)
public static int[] getFlagsSetTo(boolean[] flags, boolean state)(Code)(Java Doc)
protected static int[] getFlagsSetTo(boolean[] flags, int[] indices, boolean state)(Code)(Java Doc)
public float getFloatField(PersistenceCapable pc, int field, float currentValue)(Code)(Java Doc)
public int getHighestFieldNumber()(Code)(Java Doc)
public int getIntField(PersistenceCapable pc, int field, int currentValue)(Code)(Java Doc)
public Object getInternalObjectId()(Code)(Java Doc)
public LifeCycleState getLifecycleState()(Code)(Java Doc)
public String[] getLoadedFieldNames()(Code)(Java Doc)
public int[] getLoadedFieldNumbers()(Code)(Java Doc)
public long getLongField(PersistenceCapable pc, int field, long currentValue)(Code)(Java Doc)
public MetaDataManager getMetaDataManager()(Code)(Java Doc)
protected int[] getNonPrimaryKeyFieldNumbers()(Code)(Java Doc)
protected boolean[] getNonPrimaryKeyFields()(Code)(Java Doc)
public Object getObject()(Code)(Java Doc)
public Object getObjectField(PersistenceCapable pc, int field, Object currentValue)(Code)(Java Doc)
public ObjectManager getObjectManager()(Code)(Java Doc)
public int getPcObjectType()(Code)(Java Doc)
protected int[] getSecondClassMutableFieldNumbers()(Code)(Java Doc)
protected boolean[] getSecondClassMutableFields()(Code)(Java Doc)
public short getShortField(PersistenceCapable pc, int field, short currentValue)(Code)(Java Doc)
public StoreManager getStoreManager()(Code)(Java Doc)
public String getStringField(PersistenceCapable pc, int field, String currentValue)(Code)(Java Doc)
public Object getTransactionalVersion(Object pc)(Code)(Java Doc)
public Object getVersion(PersistenceCapable pc)(Code)(Java Doc)
protected void initialiseFieldInformation()(Code)(Java Doc)
protected boolean isDefaultFetchGroupLoaded()(Code)(Java Doc)
public boolean isDeleted(PersistenceCapable pc)(Code)(Java Doc)
public boolean isDirty(PersistenceCapable pc)(Code)(Java Doc)
public boolean isEmbedded()(Code)(Java Doc)
protected boolean isFetchPlanLoaded()(Code)(Java Doc)
public boolean isNew(PersistenceCapable pc)(Code)(Java Doc)
public boolean isPersistent(PersistenceCapable pc)(Code)(Java Doc)
public boolean isRestoreValues()(Code)(Java Doc)
public boolean isTransactional(PersistenceCapable pc)(Code)(Java Doc)
protected static Object peekField(Object obj, String fieldName)(Code)(Java Doc)
public void providedBooleanField(PersistenceCapable pc, int field, boolean currentValue)(Code)(Java Doc)
public void providedByteField(PersistenceCapable pc, int field, byte currentValue)(Code)(Java Doc)
public void providedCharField(PersistenceCapable pc, int field, char currentValue)(Code)(Java Doc)
public void providedDoubleField(PersistenceCapable pc, int field, double currentValue)(Code)(Java Doc)
public void providedFloatField(PersistenceCapable pc, int field, float currentValue)(Code)(Java Doc)
public void providedIntField(PersistenceCapable pc, int field, int currentValue)(Code)(Java Doc)
public void providedLongField(PersistenceCapable pc, int field, long currentValue)(Code)(Java Doc)
public void providedObjectField(PersistenceCapable pc, int fieldNumber, Object currentValue)(Code)(Java Doc)
public void providedShortField(PersistenceCapable pc, int field, short currentValue)(Code)(Java Doc)
public void providedStringField(PersistenceCapable pc, int field, String currentValue)(Code)(Java Doc)
public boolean replacingBooleanField(PersistenceCapable pc, int field)(Code)(Java Doc)
public byte replacingByteField(PersistenceCapable obj, int field)(Code)(Java Doc)
public char replacingCharField(PersistenceCapable obj, int field)(Code)(Java Doc)
public double replacingDoubleField(PersistenceCapable obj, int field)(Code)(Java Doc)
public float replacingFloatField(PersistenceCapable obj, int field)(Code)(Java Doc)
public int replacingIntField(PersistenceCapable obj, int field)(Code)(Java Doc)
public long replacingLongField(PersistenceCapable obj, int field)(Code)(Java Doc)
public Object replacingObjectField(PersistenceCapable obj, int field)(Code)(Java Doc)
public short replacingShortField(PersistenceCapable obj, int field)(Code)(Java Doc)
public String replacingStringField(PersistenceCapable obj, int field)(Code)(Java Doc)
public void setPcObjectType(int embeddedType)(Code)(Java Doc)
protected void setRestoreValues(boolean restore_values)(Code)(Java Doc)
public void setTransactionalVersion(Object version)(Code)(Java Doc)
public void setVersion(Object version)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.