Java Doc for StateManagerImpl.java in  » Database-ORM » TJDO » com » triactive » jdo » 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 » TJDO » com.triactive.jdo.state 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.triactive.jdo.state.StateManagerImpl

StateManagerImpl
public class StateManagerImpl implements com.triactive.jdo.StateManager(Code)
This class implements the StateManager.
author:
   Mike Martin
version:
   $Revision: 1.19 $



Constructor Summary
public  StateManagerImpl(PersistenceManager pm, PersistenceCapable pc)
     Constructs a state manager to manage an existing persistence-capable instance that is not persistent.
public  StateManagerImpl(PersistenceManager pm, Class pcClass, Object id)
     Constructs a state manager to manage a new, hollow instance having the given object ID. This constructor is used for creating new instances of existing persistent objects (i.e.

Method Summary
 voidclearPersistentFields()
    
public  voiddeletePersistent()
     Deletes the instance.
 voiddiscardSavedFields()
    
 voiddisconnect()
    
public  voiddump(PrintWriter out)
    
 voidenlistInTransaction()
    
public  voidevict()
    
 voidevictFromTransaction()
    
public  voidflush()
     Flushes any dirty fields to the data store.

Note that "dirty" in this case is not equated to being in the P_DIRTY state.

public  booleangetBooleanField(PersistenceCapable pc, int field, boolean currentValue)
     This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails).
public  bytegetByteField(PersistenceCapable pc, int field, byte currentValue)
     This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails).
public  chargetCharField(PersistenceCapable pc, int field, char currentValue)
     This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails).
public  doublegetDoubleField(PersistenceCapable pc, int field, double currentValue)
     This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails).
public  ObjectgetField(int field)
     Reads the current value of the specified field. This has the same effect on the state of the instance as if user code attempted to read the field.
Parameters:
  field - The field number to read.The value of the field.
public  floatgetFloatField(PersistenceCapable pc, int field, float currentValue)
     This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails).
public  intgetIntField(PersistenceCapable pc, int field, int currentValue)
     This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails).
public  longgetLongField(PersistenceCapable pc, int field, long currentValue)
     This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails).
public  PersistenceCapablegetObject()
    
public  ObjectgetObjectField(PersistenceCapable pc, int field, Object currentValue)
     This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails).
public  ObjectgetObjectId()
    
public  ObjectgetObjectId(PersistenceCapable pc)
     Return the object representing the JDO identity of the calling instance.
public  javax.jdo.PersistenceManagergetPersistenceManager(PersistenceCapable pc)
     Return the PersistenceManager that owns this instance.
public  PersistenceManagergetPersistenceManager()
    
public  shortgetShortField(PersistenceCapable pc, int field, short currentValue)
     This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails).
public  StoreManagergetStoreManager()
    
public  StringgetStringField(PersistenceCapable pc, int field, String currentValue)
     This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails).
public  ObjectgetTransactionalObjectId(PersistenceCapable pc)
     Return the object representing the JDO identity of the calling instance.
public  booleanisDeleted(PersistenceCapable pc)
     Tests whether this object has been deleted.
public  booleanisDirty(PersistenceCapable pc)
     Tests whether this object is dirty.
public  booleanisLoaded(PersistenceCapable pc, int field)
     Return true if the field is cached in the calling instance.

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

public  booleanisNew(PersistenceCapable pc)
     Tests whether this object has been newly made persistent.
public  booleanisPersistent(PersistenceCapable pc)
     Tests whether this object is persistent.
public  booleanisTransactional(PersistenceCapable pc)
     Tests whether this object is transactional. Instances that respect transaction boundaries return true.
 voidloadDFGFields()
     Fetchs from the database all fields in the default fetch group not already loaded.
 voidloadUnloadedFields()
     Fetchs from the database all fields not currently loaded.
public  voidmakeDirty(int field)
     Marks the given field dirty.
public  voidmakeDirty(PersistenceCapable pc, String fieldName)
     Mark the associated PersistenceCapable field dirty.
public  voidmakeNontransactional()
    
public  booleanmakePersistent()
     Makes the instance persistent.
public  voidmakeTransactional()
    
public  voidmakeTransient()
    
public  voidofferPrefetchedFields(int[] fieldNumbers, FieldManager fieldManager)
     Offers the specified pre-fetched fields to the state manager.
public  voidpostCommit()
    
 voidpreDelete()
    
public  voidpreRollback()
     This method is invoked when 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 synchronized  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  voidprovidedBooleanField(PersistenceCapable pc, int field, boolean currentValue)
     This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked.
public  voidprovidedByteField(PersistenceCapable pc, int field, byte currentValue)
     This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked.
public  voidprovidedCharField(PersistenceCapable pc, int field, char currentValue)
     This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked.
public  voidprovidedDoubleField(PersistenceCapable pc, int field, double currentValue)
     This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked.
public  voidprovidedFloatField(PersistenceCapable pc, int field, float currentValue)
     This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked.
public  voidprovidedIntField(PersistenceCapable pc, int field, int currentValue)
     This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked.
public  voidprovidedLongField(PersistenceCapable pc, int field, long currentValue)
     This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked.
public  voidprovidedObjectField(PersistenceCapable pc, int field, Object currentValue)
     This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked.
public  voidprovidedShortField(PersistenceCapable pc, int field, short currentValue)
     This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked.
public  voidprovidedStringField(PersistenceCapable pc, int field, String currentValue)
     This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked.
public  voidrefresh()
    
 voidrefreshLoadedFields()
     Refreshes from the database all fields currently loaded.
public synchronized  voidreplaceFields(int fieldNumbers, FieldManager fm)
     Called to refresh data in the PersistenceCapable object associated with this StateManager.

Unwrapped values for SCO fields are wrapped with an appropriate SCO wrapper object.
Parameters:
  fieldNumbers - An array of field numbers to be refreshed.
Parameters:
  fm - Provides the updated values.

 voidreplaceSCOFields()
     Passes all SCO field values through replaceFields(), which will wrap any unwrapped values with an appropriate SCO wrapper.
public  booleanreplacingBooleanField(PersistenceCapable pc, int field)
     This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of a boolean field.
public  bytereplacingByteField(PersistenceCapable obj, int field)
     This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of a byte field.
public  charreplacingCharField(PersistenceCapable obj, int field)
     This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of a char field.
public  doublereplacingDoubleField(PersistenceCapable obj, int field)
     This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of a double field.
public  bytereplacingFlags(PersistenceCapable pc)
     The StateManager uses this method to supply the value of jdoFlags to the associated PersistenceCapable instance.
public  floatreplacingFloatField(PersistenceCapable obj, int field)
     This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of a float field.
public  intreplacingIntField(PersistenceCapable obj, int field)
     This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of a int field.
public  longreplacingLongField(PersistenceCapable obj, int field)
     This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of a long field.
public  ObjectreplacingObjectField(PersistenceCapable obj, int field)
     This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of an Object field.
public  shortreplacingShortField(PersistenceCapable obj, int field)
     This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of a short field.
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  StringreplacingStringField(PersistenceCapable obj, int field)
     This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of a String field.
 voidrestoreFields()
    
public  voidretrieve(boolean DFGOnly)
    
 voidsaveFields()
    
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  voidsetField(int field, Object currentValue, Object newValue)
     Updates the current value of the specified field. This has the same effect on the state of the instance as if user code attempted to write the field.
Parameters:
  field - The field number to write.
Parameters:
  currentValue - The current value of the field.
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  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  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  StringtoString()
    
public  voidvalidate()
     Validates that the instance exists in the data store.
 ObjectwrapSCOInstance(int field, Object value)
    


Constructor Detail
StateManagerImpl
public StateManagerImpl(PersistenceManager pm, PersistenceCapable pc)(Code)
Constructs a state manager to manage an existing persistence-capable instance that is not persistent. All mutable SCO fields are wrapped in suitable wrapper objects and the PC instance transitions to a TransientClean state.
Parameters:
  pm - The persistence manager controlling this state manager.
Parameters:
  pc - The instance to be managed.



StateManagerImpl
public StateManagerImpl(PersistenceManager pm, Class pcClass, Object id)(Code)
Constructs a state manager to manage a new, hollow instance having the given object ID. This constructor is used for creating new instances of existing persistent objects (i.e. via pm.getObjectById()).
Parameters:
  pm - The persistence manager controlling this state manager.
Parameters:
  pcClass - The class of the new instance to be created.
Parameters:
  id - The JDO identity of the object.




Method Detail
clearPersistentFields
void clearPersistentFields()(Code)



deletePersistent
public void deletePersistent()(Code)
Deletes the instance. If the object is already deleted, this method does nothing. Otherwise, the object is removed from the data store.

Any failure will leave the instance in its previous life-cycle state.




discardSavedFields
void discardSavedFields()(Code)



disconnect
void disconnect()(Code)



dump
public void dump(PrintWriter out)(Code)



enlistInTransaction
void enlistInTransaction()(Code)



evict
public void evict()(Code)



evictFromTransaction
void evictFromTransaction()(Code)



flush
public void flush()(Code)
Flushes any dirty fields to the data store.

Note that "dirty" in this case is not equated to being in the P_DIRTY state. The P_DIRTY state means that at least one field in the object has been written by the user during the current transaction, whereas for the purposes of this method, a field is "dirty" if it's been written by the user but not yet updated in the data store. The difference is, it's possible for an object's state to be P_DIRTY, yet have no "dirty" fields because flush() has been called at least once during the transaction.




getBooleanField
public boolean getBooleanField(PersistenceCapable pc, int field, boolean currentValue)(Code)
This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails). In this implementation of the StateManager, isLoaded() has a side effect of loading unloaded information and will always return true. As such, this method should never be called.



getByteField
public byte getByteField(PersistenceCapable pc, int field, byte currentValue)(Code)
This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails). In this implementation of the StateManager, isLoaded() has a side effect of loading unloaded information and will always return true. As such, this method should never be called.



getCharField
public char getCharField(PersistenceCapable pc, int field, char currentValue)(Code)
This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails). In this implementation of the StateManager, isLoaded() has a side effect of loading unloaded information and will always return true. As such, this method should never be called.



getDoubleField
public double getDoubleField(PersistenceCapable pc, int field, double currentValue)(Code)
This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails). In this implementation of the StateManager, isLoaded() has a side effect of loading unloaded information and will always return true. As such, this method should never be called.



getField
public Object getField(int field)(Code)
Reads the current value of the specified field. This has the same effect on the state of the instance as if user code attempted to read the field.
Parameters:
  field - The field number to read.The value of the field. Primitives are boxed in appropriatejava.lang wrapper classes.



getFloatField
public float getFloatField(PersistenceCapable pc, int field, float currentValue)(Code)
This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails). In this implementation of the StateManager, isLoaded() has a side effect of loading unloaded information and will always return true. As such, this method should never be called.



getIntField
public int getIntField(PersistenceCapable pc, int field, int currentValue)(Code)
This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails). In this implementation of the StateManager, isLoaded() has a side effect of loading unloaded information and will always return true. As such, this method should never be called.



getLongField
public long getLongField(PersistenceCapable pc, int field, long currentValue)(Code)
This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails). In this implementation of the StateManager, isLoaded() has a side effect of loading unloaded information and will always return true. As such, this method should never be called.



getObject
public PersistenceCapable getObject()(Code)



getObjectField
public Object getObjectField(PersistenceCapable pc, int field, Object currentValue)(Code)
This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails). In this implementation of the StateManager, isLoaded() has a side effect of loading unloaded information and will always return true. As such, this method should never be called.



getObjectId
public Object getObjectId()(Code)



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)
Return the PersistenceManager that owns this instance.
Parameters:
  pc - the calling PersistenceCapable instancethe PersistenceManager that owns this instance



getPersistenceManager
public PersistenceManager getPersistenceManager()(Code)



getShortField
public short getShortField(PersistenceCapable pc, int field, short currentValue)(Code)
This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails). In this implementation of the StateManager, isLoaded() has a side effect of loading unloaded information and will always return true. As such, this method should never be called.



getStoreManager
public StoreManager getStoreManager()(Code)



getStringField
public String getStringField(PersistenceCapable pc, int field, String currentValue)(Code)
This method is called by the associated PersistenceCapable if the value for the specified field is not cached (i.e., StateManager.isLoaded() fails). In this implementation of the StateManager, isLoaded() has a side effect of loading unloaded information and will always return true. As such, this method should never be called.



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



isDeleted
public boolean isDeleted(PersistenceCapable pc)(Code)
Tests whether this object has been deleted. Instances that have been deleted in the current transaction return true.

Transient instances return false.
See Also:   PersistenceManager.deletePersistent(Object pc)
Parameters:
  pc - the calling PersistenceCapable instance true if this instance was deletedin the current transaction.




isDirty
public boolean isDirty(PersistenceCapable pc)(Code)
Tests whether this object is dirty. Instances that have been modified, deleted, or newly made persistent in the current transaction return true.

Transient nontransactional instances return false (JDO spec), but the TriActive implementation does not currently support the transient transactional state.
See Also:   PersistenceCapable.jdoMakeDirty(String fieldName)
Parameters:
  pc - the calling PersistenceCapable instance true if this instance has been modified in the current transaction.




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

In the TriActive 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)




isNew
public boolean isNew(PersistenceCapable pc)(Code)
Tests whether this object has been newly made persistent. Instances that have been made persistent in the current transaction return true.

Transient instances return false.
See Also:   PersistenceManager.makePersistent(Object pc)
Parameters:
  pc - the calling PersistenceCapable instance true if this instance was made persistentin the current transaction.




isPersistent
public boolean isPersistent(PersistenceCapable pc)(Code)
Tests whether this object is persistent. Instances whose state is stored in the data store return true.

Transient instances return false.
See Also:   PersistenceManager.makePersistent(Object pc)
Parameters:
  pc - the calling PersistenceCapable instance true if this instance is persistent.




isTransactional
public boolean isTransactional(PersistenceCapable pc)(Code)
Tests whether this object is transactional. Instances that respect transaction boundaries return 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.
Parameters:
  pc - the calling PersistenceCapable instance true if this instance is transactional.




loadDFGFields
void loadDFGFields()(Code)
Fetchs from the database all fields in the default fetch group not already loaded. Called by, or immediately after, life-cycle transitions.



loadUnloadedFields
void loadUnloadedFields()(Code)
Fetchs from the database all fields not currently loaded. Called by life-cycle transitions.



makeDirty
public void makeDirty(int field)(Code)
Marks the given field 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)



makePersistent
public boolean makePersistent()(Code)
Makes the instance persistent. If the object is already persistent, this method does nothing. Otherwise, a new object ID for the instance is obtained from the store manager and the object is inserted in the data store.

Any failure will leave the instance in its previous life-cycle state. true if the object was successfully made persistent,false if the object was already persistent.




makeTransactional
public void makeTransactional()(Code)



makeTransient
public void makeTransient()(Code)



offerPrefetchedFields
public void offerPrefetchedFields(int[] fieldNumbers, FieldManager fieldManager)(Code)
Offers the specified pre-fetched fields to the state manager. If the instance is in a state that can benefit from newly available field values, the fields are replaced in the instance and a state change occurs as though the instance itself had read a field. Called by pm.getObjectById() when given prefetched fields.



postCommit
public void postCommit()(Code)
This method is invoked when a commit is performed in a Transaction involving the PersistenceCapable managed by this StateManager



preDelete
void preDelete()(Code)



preRollback
public void preRollback()(Code)
This method is invoked when a rollback is performed in a Transaction involving the PersistenceCapable managed by this StateManager.



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



provideFields
public synchronized 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.



providedBooleanField
public void providedBooleanField(PersistenceCapable pc, int field, boolean currentValue)(Code)
This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is to provide the value of the specified field to the StateManager.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field



providedByteField
public void providedByteField(PersistenceCapable pc, int field, byte currentValue)(Code)
This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is to provide the value of the specified field to the StateManager.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field



providedCharField
public void providedCharField(PersistenceCapable pc, int field, char currentValue)(Code)
This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is to provide the value of the specified field to the StateManager.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field



providedDoubleField
public void providedDoubleField(PersistenceCapable pc, int field, double currentValue)(Code)
This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is to provide the value of the specified field to the StateManager.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field



providedFloatField
public void providedFloatField(PersistenceCapable pc, int field, float currentValue)(Code)
This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is to provide the value of the specified field to the StateManager.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field



providedIntField
public void providedIntField(PersistenceCapable pc, int field, int currentValue)(Code)
This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is to provide the value of the specified field to the StateManager.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field



providedLongField
public void providedLongField(PersistenceCapable pc, int field, long currentValue)(Code)
This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is to provide the value of the specified field to the StateManager.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field



providedObjectField
public void providedObjectField(PersistenceCapable pc, int field, Object currentValue)(Code)
This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is to provide the value of the specified field to the StateManager.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field



providedShortField
public void providedShortField(PersistenceCapable pc, int field, short currentValue)(Code)
This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is to provide the value of the specified field to the StateManager.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field



providedStringField
public void providedStringField(PersistenceCapable pc, int field, String currentValue)(Code)
This method is called from the associated PersistenceCapable when its PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is to provide the value of the specified field to the StateManager.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number
Parameters:
  currentValue - the current value of the field



refresh
public void refresh()(Code)



refreshLoadedFields
void refreshLoadedFields()(Code)
Refreshes from the database all fields currently loaded. Called by life-cycle transitions.



replaceFields
public synchronized void replaceFields(int fieldNumbers, FieldManager fm)(Code)
Called to refresh data in the PersistenceCapable object associated with this StateManager.

Unwrapped values for SCO fields are wrapped with an appropriate SCO wrapper object.
Parameters:
  fieldNumbers - An array of field numbers to be refreshed.
Parameters:
  fm - Provides the updated values. This object is only used for theduration of the call.




replaceSCOFields
void replaceSCOFields()(Code)
Passes all SCO field values through replaceFields(), which will wrap any unwrapped values with an appropriate SCO wrapper.



replacingBooleanField
public boolean replacingBooleanField(PersistenceCapable pc, int field)(Code)
This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of a boolean field.
Parameters:
  pc - the calling PersistenceCapable instance
Parameters:
  field - the field number the new value for the field



replacingByteField
public byte replacingByteField(PersistenceCapable obj, int field)(Code)
This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of a byte field.
Parameters:
  obj - the calling PersistenceCapable instance
Parameters:
  field - the field number the new value for the field



replacingCharField
public char replacingCharField(PersistenceCapable obj, int field)(Code)
This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of a char field.
Parameters:
  obj - the calling PersistenceCapable instance
Parameters:
  field - the field number the new value for the field



replacingDoubleField
public double replacingDoubleField(PersistenceCapable obj, int field)(Code)
This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of a double field.
Parameters:
  obj - the calling PersistenceCapable instance
Parameters:
  field - the field number the new value for the field



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 instancethe value of jdoFlags to be stored in the PersistenceCapable instance



replacingFloatField
public float replacingFloatField(PersistenceCapable obj, int field)(Code)
This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of a float field.
Parameters:
  obj - the calling PersistenceCapable instance
Parameters:
  field - the field number the new value for the field



replacingIntField
public int replacingIntField(PersistenceCapable obj, int field)(Code)
This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of a int field.
Parameters:
  obj - the calling PersistenceCapable instance
Parameters:
  field - the field number the new value for the field



replacingLongField
public long replacingLongField(PersistenceCapable obj, int field)(Code)
This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of a long field.
Parameters:
  obj - the calling PersistenceCapable instance
Parameters:
  field - the field number the new value for the field



replacingObjectField
public Object replacingObjectField(PersistenceCapable obj, int field)(Code)
This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of an Object field.
Parameters:
  obj - the calling PersistenceCapable instance
Parameters:
  field - the field number the new value for the field



replacingShortField
public short replacingShortField(PersistenceCapable obj, int field)(Code)
This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of a short field.
Parameters:
  obj - the calling PersistenceCapable instance
Parameters:
  field - the field number the new value for the field



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



replacingStringField
public String replacingStringField(PersistenceCapable obj, int field)(Code)
This method is invoked by the PersistenceCapable object's jdoReplaceField() method to refresh the value of a String field.
Parameters:
  obj - the calling PersistenceCapable instance
Parameters:
  field - the field number the new value for the field



restoreFields
void restoreFields()(Code)



retrieve
public void retrieve(boolean DFGOnly)(Code)



saveFields
void saveFields()(Code)



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



setField
public void setField(int field, Object currentValue, Object newValue)(Code)
Updates the current value of the specified field. This has the same effect on the state of the instance as if user code attempted to write the field.
Parameters:
  field - The field number to write.
Parameters:
  currentValue - The current value of the field. Used to determine whether or notthe write is redundant. If necessary, the value can be obtainedusing StateManagerImpl.getField.
Parameters:
  newValue - The new value of the field. Primitives must be boxed in appropriatejava.lang wrapper classes.



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



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



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



toString
public String toString()(Code)



validate
public void validate()(Code)
Validates that the instance exists in the data store. Called by pm.getObjectById() when validate == true.



wrapSCOInstance
Object wrapSCOInstance(int field, Object value)(Code)



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.