Java Doc for State.java in  » Testing » PolePosition-0.20 » com » versant » core » common » 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 » Testing » PolePosition 0.20 » com.versant.core.common 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.versant.core.common.State

All known Subclasses:   com.versant.core.jdo.InitState,  com.versant.core.jdo.QueryStateWrapper,  com.versant.core.common.NULLState,  com.versant.core.jdo.DeletedState,  com.versant.core.common.GenericState,
State
abstract public class State (Code)
This is an abstract base class for State classes. Each State class is a container for the persistent fields of a PC class and all of its superclasses. These fields may include fake fields generated by the store to hold extra store specific information (e.g. row version column values).

Methods always use field numbers relative to the topmost class in the heirachy. This range of numbers includes fake fields present in each class.

Example of the State fieldNo range for C extends B extends A:
A.superFieldCount[A fields] (A.superFieldCount + A.realFieldCount)[A fakes]
B.superFieldCount[B fields] (B.superFieldCount + B.realFieldCount)[B fakes]
C.superFieldCount[C fields] (C.superFieldCount + C.realFieldCount)[C fakes]

Each PC class has its own implementation generated for it at runtime. These classes have fast implementations of various methods in the base class designed for different data stores. The JDO meta data for each PC class is a factory for its State instances.

Lifecycle: State is create in datastore on a request for data. This state is offered to the l2cache and returned to the requesting client. There the state is eiter used to update the state of a PCStateMan or added directly to the LocalPMCache. Any mutable data in that is contained in a state should be considered immutable. This is because if can share the same data that was returned by a state and changing it would result in weird behaviour. TODO: Go through all data struct that is returned by state and check if immutablility can be enforced.
See Also:   ClassMetaData.fields
See Also:   ClassMetaData.realFieldCount
See Also:   ClassMetaData.superFieldCount





Method Summary
public  voidaddFetchGroupStatesToDCS(FetchGroup fg, DetachStateContainer dcs, VersantPersistenceManagerImp pm, OID oid, ClassMetaData cmd)
     Add all states referenced by fields in fg to the dcs.
abstract public  voidaddOneToManyInverseFieldsForL2Evict(VersantPersistenceManagerImp pm)
     Add the values of any non-null reference fields used as back or inverse fields for unmanaged one-to-many collections for eviction from the L2 cache on commit.
abstract public  voidaddRefs(VersantPersistenceManagerImp sm, PCStateMan pcStateMan)
    
abstract public  booleancheckKeyFields(OID oid)
     Check to see if the state contains the same id field as the oid.
abstract public  voidclear()
     Clear the state of all its fields and reset it to notFilled.
abstract public  voidclearApplicationIdentityFields()
     Clear any application identity fields from this State.
abstract public  voidclearCollectionFields()
     Clear all fields of type mem.
abstract public  voidclearDirtyFields()
     Mark all dirty fields as clean and not filled and not resolved.
abstract public  voidclearFilledFlags()
     Reset the filled flag for each field.
abstract public  voidclearNonAutoSetFields()
     Clear all the non autoSet fields.
abstract public  voidclearNonFilled(State state)
     Clear the fields in this state that is not filled in on the supplied state.
abstract public  voidclearSCOFields()
     This cleares all the sco fields of the state of their values and sets it to non filled.
abstract public  voidclearTransactionNonPersistentFields()
     Clear all the transaction but non persistent fields.
abstract public  intcompareToPass1(State state)
     Return 0 if state has the same field numbers as us, less than 0 we are less than it or greater than 0 if we are greater than it.
abstract public  booleancontainFields(int[] stateFieldNos)
     Check if the state contains the specified stateFieldNos.
abstract public  booleancontainFieldsAbs(int[] absFieldNos)
     Check if the state contains the specified absFieldNos.
abstract public  booleancontainsApplicationIdentityFields()
     Does this State contain all of the application identity fields for its class? This returns false if the class does not use application identity.
abstract public  booleancontainsFetchGroup(FetchGroup fetchGroup)
     Return true if all the fields defined in the specified fetch group are filled in.
abstract public  booleancontainsField(int stateFieldNo)
     Return true if the value for this stateFieldNo is valid i.e.
abstract public  booleancontainsFieldAbs(int absFieldNo)
     Return true if the value for this absFieldNo is valid i.e.
abstract public  booleancontainsPass1Fields()
    
abstract public  booleancontainsPass2Fields()
    
abstract public  booleancontainsValidAppIdFields()
     Does this State contain all of the application identity fields for its class with values different to a default instance of the application identity class? This returns false if the class does not use application identity.
abstract public  voidcopyFields(OID oid)
     Populate the primary key fields from the OID.
abstract public  voidcopyFieldsForOptimisticLocking(State state, VersantPersistenceManagerImp sm)
     This must copy the fields from the supplied to the current state.
abstract public  voidcopyKeyFields(OID oid)
     Populate the OID from this state.
abstract public  voidcopyKeyFieldsUpdate(OID oid)
     Populate the OID from this state.
abstract public  voidcopyOptimisticLockingField(State state)
     This copies the optimistic locking field if not already set.
abstract public  voidfillForRead(State dest, VersantPersistenceManagerImp sm)
     Fill dest with all of the fake and ref fields of this State.
abstract public  booleanfillToStoreState(State stateToStore, PersistenceContext sm, VersantStateManager pcStateMan)
    

This return a deep clone of this state instance with only fields that must be sent to the server to persist changes to this instance filled in.

abstract public  voidfindDirectEdges(OIDGraph graph, IntArray edges)
     Add the graph indexes of all OIDs that we have direct references to (e.g.
protected  voidfindDirectEdges(OIDGraph graph, ClassMetaData cmd, int fieldNo, State state, IntArray edges)
     Find the graph indexes of all the OIDs directly referenced by fieldNo and add them to edges.
abstract public  booleangetBooleanField(int stateFieldNo)
     Return the value for the field.
abstract public  booleangetBooleanFieldAbs(int absFieldNo)
    
abstract public  bytegetByteField(int stateFieldNo)
     Return the value for the field.
abstract public  bytegetByteFieldAbs(int absFieldNo)
    
abstract public  chargetCharField(int stateFieldNo)
     Return the value for the field.
abstract public  chargetCharFieldAbs(int absFieldNo)
    
abstract public  intgetClassIndex()
     Return the index of our PC class in the meta data.
abstract public  ClassMetaDatagetClassMetaData(ModelMetaData jmd)
     Get the meta data for our class.
abstract public  ClassMetaDatagetClassMetaData()
     Return the ClassMetaData.
abstract public  StategetCopy()
     Make a shallow copy of the state.
abstract public  doublegetDoubleField(int stateFieldNo)
     Return the value for the field.
abstract public  doublegetDoubleFieldAbs(int absFieldNo)
    
abstract public  intgetFieldNos(int[] buf)
     Put the numbers of all fields we have into buf.
abstract public  floatgetFloatField(int stateFieldNo)
     Return the value for the field.
abstract public  floatgetFloatFieldAbs(int absFieldNo)
    
abstract public  intgetIntField(int stateFieldNo)
     Return the value for the field.
abstract public  intgetIntFieldAbs(int absFieldNo)
    
abstract public  ObjectgetInternalObjectField(int field)
     Return the internal value for the field.
abstract public  ObjectgetInternalObjectFieldAbs(int field)
    
abstract public  longgetLongField(int stateFieldNo)
     Return the value for the field.
abstract public  longgetLongFieldAbs(int absFieldNo)
    
abstract public  longgetLongFieldInternal(int stateFieldNo)
     Return the value for the field or 0L if it is not filled.
abstract public  ObjectgetObjectField(int stateFieldNo, PersistenceCapable owningPC, PersistenceContext pm, OID oid)
     Return the value for the field.
abstract public  ObjectgetObjectFieldAbs(int absFieldNo, PersistenceCapable owningPC, PersistenceContext pm, OID oid)
    
abstract public  ObjectgetOptimisticLockingValue()
     The value of the version field on the pc.
abstract public  intgetPass1FieldNos(int[] buf)
     Put the numbers of all pass 1 fields we have into buf.
abstract public  intgetPass1FieldRefFieldNosWithNewOids(int[] stateFieldNoBuf)
     Fill the array with the stateFieldNo of reference fields that contain NewOid's.
abstract public  intgetPass2FieldNos(int[] buf)
     Put the numbers of all pass 2 fields we have into buf.
abstract public  shortgetShortField(int stateFieldNo)
     Return the value for the field.
abstract public  shortgetShortFieldAbs(int absFieldNo)
    
abstract public  StringgetStringField(int stateFieldNo)
     Return the value for the field.
abstract public  StringgetStringFieldAbs(int absFieldNo)
    
abstract public  StringgetVersion()
    
abstract public  booleanhasSameFields(State state)
    
public  booleanisCacheble()
     If the data of this state may be used to update the cache.
abstract public  booleanisDirty()
     Return true if any field is dirty.
abstract public  booleanisDirty(int fieldNo)
     Check if a specific field is dirty.
abstract public  booleanisEmpty()
     Check if the state holds any values.
abstract public  booleanisFieldNullorZero(int stateFieldNo)
    
abstract public  booleanisHollow()
     To check if the state is hollow.
abstract public  booleanisNull(int stateFieldNo)
    
abstract public  booleanisResolvedForClient(int stateFieldNo)
    
abstract public  voidmakeClean()
     Reset the dirty status of the state and its fields.
abstract public  voidmakeDirtyAbs(int fieldNo)
     Mark the specified field as dirty.
abstract public  StatenewInstance()
    
abstract public  voidreadExternal(OIDObjectInput is)
     Our version of readExternal for serialization.
abstract public  booleanreplaceNewObjectOIDs(int[] fieldNos, int fieldNosLength)
     Replace any NewObjectOID's in fields in fieldNos in this state with their realOID's.
abstract public  intreplaceSCOFields(PersistenceCapable owner, VersantPersistenceManagerImp sm, int[] absFieldNos)
     This will replace all fields that should be a SCO field with it's SCO implementation.
public  ObjectresolveArrayOIDs(Object[] oids, PersistenceContext sm, Class type)
    
public  ObjectresolveArrayValues(Object vals, PersistenceContext pm)
    
abstract public  voidretrieve(VersantPersistenceManagerImp sm)
    
abstract public  voidsetBooleanField(int stateFieldNo, boolean newValue)
     Set the value of the field.
abstract public  voidsetBooleanFieldAbs(int absFieldNo, boolean newValue)
    
abstract public  voidsetByteField(int stateFieldNo, byte newValue)
     Set the value of the field.
abstract public  voidsetByteFieldAbs(int absFieldNo, byte newValue)
    
abstract public  voidsetCharField(int stateFieldNo, char newValue)
     Set the value of the field.
abstract public  voidsetCharFieldAbs(int absFieldNo, char newValue)
    
abstract public  voidsetClassMetaData(ClassMetaData cmd)
     Set the meta data for this State.
abstract public  voidsetDoubleField(int stateFieldNo, double newValue)
     Set the value of the field.
abstract public  voidsetDoubleFieldAbs(int absFieldNo, double newValue)
    
abstract public  voidsetFilled(int stateFieldNo)
     Mark field as filled.
abstract public  voidsetFloatField(int stateFieldNo, float newValue)
     Set the value of the field.
abstract public  voidsetFloatFieldAbs(int absFieldNo, float newValue)
    
abstract public  voidsetIntField(int stateFieldNo, int newValue)
     Set the value of the field.
abstract public  voidsetIntFieldAbs(int absFieldNo, int newValue)
    
abstract public  voidsetInternalBooleanField(int field, boolean newValue)
     Set the value of the field internally.
abstract public  voidsetInternalBooleanFieldAbs(int field, boolean newValue)
    
abstract public  voidsetInternalByteField(int field, byte newValue)
     Set the value of the field internally.
abstract public  voidsetInternalByteFieldAbs(int field, byte newValue)
    
abstract public  voidsetInternalCharField(int field, char newValue)
     Set the value of the field internally.
abstract public  voidsetInternalCharFieldAbs(int field, char newValue)
    
abstract public  voidsetInternalDoubleField(int field, double newValue)
     Set the value of the field internally.
abstract public  voidsetInternalDoubleFieldAbs(int field, double newValue)
    
abstract public  voidsetInternalFloatField(int field, float newValue)
     Set the value of the field internally.
abstract public  voidsetInternalFloatFieldAbs(int field, float newValue)
    
abstract public  voidsetInternalIntField(int field, int newValue)
     Set the value of the field internally.
abstract public  voidsetInternalIntFieldAbs(int field, int newValue)
    
abstract public  voidsetInternalLongField(int field, long newValue)
     Set the value of the field internally.
abstract public  voidsetInternalLongFieldAbs(int field, long newValue)
    
abstract public  voidsetInternalObjectField(int field, Object newValue)
     Set the value of the field internally.
abstract public  voidsetInternalObjectFieldAbs(int field, Object newValue)
    
abstract public  voidsetInternalShortField(int field, short newValue)
     Set the value of the field internally.
abstract public  voidsetInternalShortFieldAbs(int field, short newValue)
    
abstract public  voidsetInternalStringField(int field, String newValue)
     Set the value of the field internally.
abstract public  voidsetInternalStringFieldAbs(int field, String newValue)
    
abstract public  voidsetLongField(int stateFieldNo, long newValue)
     Set the value of the field.
abstract public  voidsetLongFieldAbs(int absFieldNo, long newValue)
    
abstract public  voidsetObjectField(int stateFieldNo, Object newValue)
     Set the value of the field.
abstract public  voidsetObjectFieldAbs(int absFieldNo, Object newValue)
    
abstract public  voidsetObjectFieldUnresolved(int field, Object newValue)
    
abstract public  voidsetObjectFieldUnresolvedAbs(int field, Object newValue)
    
abstract public  voidsetShortField(int stateFieldNo, short newValue)
     Set the value of the field.
abstract public  voidsetShortFieldAbs(int absFieldNo, short newValue)
    
abstract public  voidsetStringField(int stateFieldNo, String newValue)
     Set the value of the field.
abstract public  voidsetStringFieldAbs(int absFieldNo, String newValue)
    
abstract public  voidunmanageSCOFields()
     Called when the pc instance is made transient to unset the sco instance of the pc owner.
abstract public  voidupdateAutoSetFieldsCreated(Date now)
     Update all autoset fields that must be set on commit of a new JDO instance.
abstract public  voidupdateAutoSetFieldsModified(Date now, State oldState)
     Update all autoset fields that must be set on commit of modifications to an existing JDO instance.
abstract public  voidupdateFrom(State state)
     Update this state from the supplied state.
abstract public  voidupdateNonFilled(State state)
     Update this state from the supplied state.
public  voidvalidateForCache()
     This is just for testing and will not be called in (real)runtime.
abstract public  voidwriteExternal(OIDObjectOutput os)
     Our version of writeExternal for serialization.



Method Detail
addFetchGroupStatesToDCS
public void addFetchGroupStatesToDCS(FetchGroup fg, DetachStateContainer dcs, VersantPersistenceManagerImp pm, OID oid, ClassMetaData cmd)(Code)
Add all states referenced by fields in fg to the dcs.



addOneToManyInverseFieldsForL2Evict
abstract public void addOneToManyInverseFieldsForL2Evict(VersantPersistenceManagerImp pm)(Code)
Add the values of any non-null reference fields used as back or inverse fields for unmanaged one-to-many collections for eviction from the L2 cache on commit. Note that the filled status of the field is not checked. This method is called only for newly managed instances so all fields will be filled.



addRefs
abstract public void addRefs(VersantPersistenceManagerImp sm, PCStateMan pcStateMan)(Code)



checkKeyFields
abstract public boolean checkKeyFields(OID oid)(Code)
Check to see if the state contains the same id field as the oid. The oid that is passed in is filled correctly.



clear
abstract public void clear()(Code)
Clear the state of all its fields and reset it to notFilled.



clearApplicationIdentityFields
abstract public void clearApplicationIdentityFields()(Code)
Clear any application identity fields from this State. This is a NOP if the class does not use application identity.



clearCollectionFields
abstract public void clearCollectionFields()(Code)
Clear all fields of type mem.



clearDirtyFields
abstract public void clearDirtyFields()(Code)
Mark all dirty fields as clean and not filled and not resolved.



clearFilledFlags
abstract public void clearFilledFlags()(Code)
Reset the filled flag for each field.



clearNonAutoSetFields
abstract public void clearNonAutoSetFields()(Code)
Clear all the non autoSet fields.



clearNonFilled
abstract public void clearNonFilled(State state)(Code)
Clear the fields in this state that is not filled in on the supplied state.
Parameters:
  state -



clearSCOFields
abstract public void clearSCOFields()(Code)
This cleares all the sco fields of the state of their values and sets it to non filled.



clearTransactionNonPersistentFields
abstract public void clearTransactionNonPersistentFields()(Code)
Clear all the transaction but non persistent fields.



compareToPass1
abstract public int compareToPass1(State state)(Code)
Return 0 if state has the same field numbers as us, less than 0 we are less than it or greater than 0 if we are greater than it. The definition of less than and greater than is up to the state implementation but must be detirministic. For fields that are stored using Oracle style LOBs then the nullness of the value must also be considered in the comparison i.e. states with field x null and not null respectively are different.
Parameters:
  state - State to compare to (will be for same class)



containFields
abstract public boolean containFields(int[] stateFieldNos)(Code)
Check if the state contains the specified stateFieldNos.



containFieldsAbs
abstract public boolean containFieldsAbs(int[] absFieldNos)(Code)
Check if the state contains the specified absFieldNos.



containsApplicationIdentityFields
abstract public boolean containsApplicationIdentityFields()(Code)
Does this State contain all of the application identity fields for its class? This returns false if the class does not use application identity.



containsFetchGroup
abstract public boolean containsFetchGroup(FetchGroup fetchGroup)(Code)
Return true if all the fields defined in the specified fetch group are filled in.



containsField
abstract public boolean containsField(int stateFieldNo)(Code)
Return true if the value for this stateFieldNo is valid i.e. it has been read from the data store or set by a client etc etc.



containsFieldAbs
abstract public boolean containsFieldAbs(int absFieldNo)(Code)
Return true if the value for this absFieldNo is valid i.e. it has been read from the data store or set by a client etc etc.



containsPass1Fields
abstract public boolean containsPass1Fields()(Code)
Do we contain any pass 1 fields?
See Also:   FieldMetaData.secondaryField
See Also:   ClassMetaData.pass2Fields



containsPass2Fields
abstract public boolean containsPass2Fields()(Code)
Do we contain any pass 2 fields?
See Also:   FieldMetaData.secondaryField
See Also:   ClassMetaData.pass2Fields



containsValidAppIdFields
abstract public boolean containsValidAppIdFields()(Code)
Does this State contain all of the application identity fields for its class with values different to a default instance of the application identity class? This returns false if the class does not use application identity.



copyFields
abstract public void copyFields(OID oid)(Code)
Populate the primary key fields from the OID. This is only called for PC classes that are using application identity.



copyFieldsForOptimisticLocking
abstract public void copyFieldsForOptimisticLocking(State state, VersantPersistenceManagerImp sm)(Code)
This must copy the fields from the supplied to the current state. The copied fields is used for to compare against to detect concurrent updates.
Parameters:
  state -
Parameters:
  sm -



copyKeyFields
abstract public void copyKeyFields(OID oid)(Code)
Populate the OID from this state. This is called for classes using application identity when a new object is persisted. It will not be called otherwise.



copyKeyFieldsUpdate
abstract public void copyKeyFieldsUpdate(OID oid)(Code)
Populate the OID from this state. This is called for classes using application identity when a primary key field of an existing object is updated. It will not be called otherwise. Note that if the primary key consists of multiple fields then those that have not changed may not be in state.



copyOptimisticLockingField
abstract public void copyOptimisticLockingField(State state)(Code)
This copies the optimistic locking field if not already set.
Parameters:
  state -



fillForRead
abstract public void fillForRead(State dest, VersantPersistenceManagerImp sm)(Code)
Fill dest with all of the fake and ref fields of this State. This is used for stores that require the current values of fake fields to be sent when fetching certain fields (e.g. fetching a Collection stored as an SCO in VDS). The ref fields are converted into OIDs if they are pc.



fillToStoreState
abstract public boolean fillToStoreState(State stateToStore, PersistenceContext sm, VersantStateManager pcStateMan)(Code)

This return a deep clone of this state instance with only fields that must be sent to the server to persist changes to this instance filled in. For JdbcDataStore this will include only the dirty fields. For VdsDataStore this includes all fields so the whole DataStoreObject can be written.

All 'First Class Objects' will be resolved to an OID and 'Second Class Objects' will be resolved to some serializable/storable format that represents the state of the field.

True if some fields were written to stateToStore and false ifnot (i.e. we have no dirty fields)



findDirectEdges
abstract public void findDirectEdges(OIDGraph graph, IntArray edges)(Code)
Add the graph indexes of all OIDs that we have direct references to (e.g. foreign keys) to edges. This is called as part of the graph sorting process.
See Also:   PersistGraph.sort



findDirectEdges
protected void findDirectEdges(OIDGraph graph, ClassMetaData cmd, int fieldNo, State state, IntArray edges)(Code)
Find the graph indexes of all the OIDs directly referenced by fieldNo and add them to edges. Any referenced OIDs that are not in the graph should be ignored.



getBooleanField
abstract public boolean getBooleanField(int stateFieldNo)(Code)
Return the value for the field.



getBooleanFieldAbs
abstract public boolean getBooleanFieldAbs(int absFieldNo)(Code)



getByteField
abstract public byte getByteField(int stateFieldNo)(Code)
Return the value for the field.



getByteFieldAbs
abstract public byte getByteFieldAbs(int absFieldNo)(Code)



getCharField
abstract public char getCharField(int stateFieldNo)(Code)
Return the value for the field.



getCharFieldAbs
abstract public char getCharFieldAbs(int absFieldNo)(Code)



getClassIndex
abstract public int getClassIndex()(Code)
Return the index of our PC class in the meta data. Do not use this to get the meta data for our class. Call getClassMetaData instead.
See Also:   ModelMetaData.classes
See Also:   State.getClassMetaData



getClassMetaData
abstract public ClassMetaData getClassMetaData(ModelMetaData jmd)(Code)
Get the meta data for our class.
Parameters:
  jmd - The meta data we belong to



getClassMetaData
abstract public ClassMetaData getClassMetaData()(Code)
Return the ClassMetaData.



getCopy
abstract public State getCopy()(Code)
Make a shallow copy of the state.



getDoubleField
abstract public double getDoubleField(int stateFieldNo)(Code)
Return the value for the field.



getDoubleFieldAbs
abstract public double getDoubleFieldAbs(int absFieldNo)(Code)



getFieldNos
abstract public int getFieldNos(int[] buf)(Code)
Put the numbers of all fields we have into buf. The number of field numbers stored is returned.



getFloatField
abstract public float getFloatField(int stateFieldNo)(Code)
Return the value for the field.



getFloatFieldAbs
abstract public float getFloatFieldAbs(int absFieldNo)(Code)



getIntField
abstract public int getIntField(int stateFieldNo)(Code)
Return the value for the field.



getIntFieldAbs
abstract public int getIntFieldAbs(int absFieldNo)(Code)



getInternalObjectField
abstract public Object getInternalObjectField(int field)(Code)
Return the internal value for the field.



getInternalObjectFieldAbs
abstract public Object getInternalObjectFieldAbs(int field)(Code)



getLongField
abstract public long getLongField(int stateFieldNo)(Code)
Return the value for the field.



getLongFieldAbs
abstract public long getLongFieldAbs(int absFieldNo)(Code)



getLongFieldInternal
abstract public long getLongFieldInternal(int stateFieldNo)(Code)
Return the value for the field or 0L if it is not filled.



getObjectField
abstract public Object getObjectField(int stateFieldNo, PersistenceCapable owningPC, PersistenceContext pm, OID oid)(Code)
Return the value for the field.



getObjectFieldAbs
abstract public Object getObjectFieldAbs(int absFieldNo, PersistenceCapable owningPC, PersistenceContext pm, OID oid)(Code)



getOptimisticLockingValue
abstract public Object getOptimisticLockingValue()(Code)
The value of the version field on the pc. This will return null if there are no version fields.



getPass1FieldNos
abstract public int getPass1FieldNos(int[] buf)(Code)
Put the numbers of all pass 1 fields we have into buf. The number of field numbers stored is returned.
See Also:   FieldMetaData.secondaryField
See Also:   ClassMetaData.pass2Fields



getPass1FieldRefFieldNosWithNewOids
abstract public int getPass1FieldRefFieldNosWithNewOids(int[] stateFieldNoBuf)(Code)
Fill the array with the stateFieldNo of reference fields that contain NewOid's.



getPass2FieldNos
abstract public int getPass2FieldNos(int[] buf)(Code)
Put the numbers of all pass 2 fields we have into buf. The number of field numbers stored is returned.
See Also:   FieldMetaData.secondaryField
See Also:   ClassMetaData.pass2Fields



getShortField
abstract public short getShortField(int stateFieldNo)(Code)
Return the value for the field.



getShortFieldAbs
abstract public short getShortFieldAbs(int absFieldNo)(Code)



getStringField
abstract public String getStringField(int stateFieldNo)(Code)
Return the value for the field.



getStringFieldAbs
abstract public String getStringFieldAbs(int absFieldNo)(Code)



getVersion
abstract public String getVersion()(Code)



hasSameFields
abstract public boolean hasSameFields(State state)(Code)
Does this State contain exactly the same fields as the supplied State?
Parameters:
  state - State to compare to (will be for same class)



isCacheble
public boolean isCacheble()(Code)
If the data of this state may be used to update the cache.



isDirty
abstract public boolean isDirty()(Code)
Return true if any field is dirty.



isDirty
abstract public boolean isDirty(int fieldNo)(Code)
Check if a specific field is dirty.
Parameters:
  fieldNo -



isEmpty
abstract public boolean isEmpty()(Code)
Check if the state holds any values.



isFieldNullorZero
abstract public boolean isFieldNullorZero(int stateFieldNo)(Code)
Is the field null or zero?



isHollow
abstract public boolean isHollow()(Code)
To check if the state is hollow. This is for debug/testing only.



isNull
abstract public boolean isNull(int stateFieldNo)(Code)
Is the supplied stateFieldNo null?



isResolvedForClient
abstract public boolean isResolvedForClient(int stateFieldNo)(Code)
Is this state field nummber resolved for the Client



makeClean
abstract public void makeClean()(Code)
Reset the dirty status of the state and its fields.



makeDirtyAbs
abstract public void makeDirtyAbs(int fieldNo)(Code)
Mark the specified field as dirty.
Parameters:
  fieldNo -



newInstance
abstract public State newInstance()(Code)
Return a new State instance new State instance



readExternal
abstract public void readExternal(OIDObjectInput is) throws IOException, ClassNotFoundException(Code)
Our version of readExternal for serialization.



replaceNewObjectOIDs
abstract public boolean replaceNewObjectOIDs(int[] fieldNos, int fieldNosLength)(Code)
Replace any NewObjectOID's in fields in fieldNos in this state with their realOID's. Entries in fieldNos that are less than 0 should be skipped. Note that skipped entries will never be for fields that could hold OIDs.



replaceSCOFields
abstract public int replaceSCOFields(PersistenceCapable owner, VersantPersistenceManagerImp sm, int[] absFieldNos)(Code)
This will replace all fields that should be a SCO field with it's SCO implementation. This is used for retain values where the client has set a field that must be a sco field and this must be converted after commit.



resolveArrayOIDs
public Object resolveArrayOIDs(Object[] oids, PersistenceContext sm, Class type)(Code)



resolveArrayValues
public Object resolveArrayValues(Object vals, PersistenceContext pm)(Code)



retrieve
abstract public void retrieve(VersantPersistenceManagerImp sm)(Code)



setBooleanField
abstract public void setBooleanField(int stateFieldNo, boolean newValue)(Code)
Set the value of the field.



setBooleanFieldAbs
abstract public void setBooleanFieldAbs(int absFieldNo, boolean newValue)(Code)



setByteField
abstract public void setByteField(int stateFieldNo, byte newValue)(Code)
Set the value of the field.



setByteFieldAbs
abstract public void setByteFieldAbs(int absFieldNo, byte newValue)(Code)



setCharField
abstract public void setCharField(int stateFieldNo, char newValue)(Code)
Set the value of the field.



setCharFieldAbs
abstract public void setCharFieldAbs(int absFieldNo, char newValue)(Code)



setClassMetaData
abstract public void setClassMetaData(ClassMetaData cmd)(Code)
Set the meta data for this State. If this is stored in a field it must be transient. This will be called again when saving so there is no need to trundle it back and forth.



setDoubleField
abstract public void setDoubleField(int stateFieldNo, double newValue)(Code)
Set the value of the field.



setDoubleFieldAbs
abstract public void setDoubleFieldAbs(int absFieldNo, double newValue)(Code)



setFilled
abstract public void setFilled(int stateFieldNo)(Code)
Mark field as filled.



setFloatField
abstract public void setFloatField(int stateFieldNo, float newValue)(Code)
Set the value of the field.



setFloatFieldAbs
abstract public void setFloatFieldAbs(int absFieldNo, float newValue)(Code)



setIntField
abstract public void setIntField(int stateFieldNo, int newValue)(Code)
Set the value of the field.



setIntFieldAbs
abstract public void setIntFieldAbs(int absFieldNo, int newValue)(Code)



setInternalBooleanField
abstract public void setInternalBooleanField(int field, boolean newValue)(Code)
Set the value of the field internally.



setInternalBooleanFieldAbs
abstract public void setInternalBooleanFieldAbs(int field, boolean newValue)(Code)



setInternalByteField
abstract public void setInternalByteField(int field, byte newValue)(Code)
Set the value of the field internally.



setInternalByteFieldAbs
abstract public void setInternalByteFieldAbs(int field, byte newValue)(Code)



setInternalCharField
abstract public void setInternalCharField(int field, char newValue)(Code)
Set the value of the field internally.



setInternalCharFieldAbs
abstract public void setInternalCharFieldAbs(int field, char newValue)(Code)



setInternalDoubleField
abstract public void setInternalDoubleField(int field, double newValue)(Code)
Set the value of the field internally.



setInternalDoubleFieldAbs
abstract public void setInternalDoubleFieldAbs(int field, double newValue)(Code)



setInternalFloatField
abstract public void setInternalFloatField(int field, float newValue)(Code)
Set the value of the field internally.



setInternalFloatFieldAbs
abstract public void setInternalFloatFieldAbs(int field, float newValue)(Code)



setInternalIntField
abstract public void setInternalIntField(int field, int newValue)(Code)
Set the value of the field internally.



setInternalIntFieldAbs
abstract public void setInternalIntFieldAbs(int field, int newValue)(Code)



setInternalLongField
abstract public void setInternalLongField(int field, long newValue)(Code)
Set the value of the field internally.



setInternalLongFieldAbs
abstract public void setInternalLongFieldAbs(int field, long newValue)(Code)



setInternalObjectField
abstract public void setInternalObjectField(int field, Object newValue)(Code)
Set the value of the field internally.



setInternalObjectFieldAbs
abstract public void setInternalObjectFieldAbs(int field, Object newValue)(Code)



setInternalShortField
abstract public void setInternalShortField(int field, short newValue)(Code)
Set the value of the field internally.



setInternalShortFieldAbs
abstract public void setInternalShortFieldAbs(int field, short newValue)(Code)



setInternalStringField
abstract public void setInternalStringField(int field, String newValue)(Code)
Set the value of the field internally.



setInternalStringFieldAbs
abstract public void setInternalStringFieldAbs(int field, String newValue)(Code)



setLongField
abstract public void setLongField(int stateFieldNo, long newValue)(Code)
Set the value of the field.



setLongFieldAbs
abstract public void setLongFieldAbs(int absFieldNo, long newValue)(Code)



setObjectField
abstract public void setObjectField(int stateFieldNo, Object newValue)(Code)
Set the value of the field.



setObjectFieldAbs
abstract public void setObjectFieldAbs(int absFieldNo, Object newValue)(Code)



setObjectFieldUnresolved
abstract public void setObjectFieldUnresolved(int field, Object newValue)(Code)



setObjectFieldUnresolvedAbs
abstract public void setObjectFieldUnresolvedAbs(int field, Object newValue)(Code)



setShortField
abstract public void setShortField(int stateFieldNo, short newValue)(Code)
Set the value of the field.



setShortFieldAbs
abstract public void setShortFieldAbs(int absFieldNo, short newValue)(Code)



setStringField
abstract public void setStringField(int stateFieldNo, String newValue)(Code)
Set the value of the field.



setStringFieldAbs
abstract public void setStringFieldAbs(int absFieldNo, String newValue)(Code)



unmanageSCOFields
abstract public void unmanageSCOFields()(Code)
Called when the pc instance is made transient to unset the sco instance of the pc owner.



updateAutoSetFieldsCreated
abstract public void updateAutoSetFieldsCreated(Date now)(Code)
Update all autoset fields that must be set on commit of a new JDO instance.
See Also:   FieldMetaData.autoSet



updateAutoSetFieldsModified
abstract public void updateAutoSetFieldsModified(Date now, State oldState)(Code)
Update all autoset fields that must be set on commit of modifications to an existing JDO instance.
Parameters:
  oldState - The pre-modification state of the instance.
See Also:   FieldMetaData.autoSet



updateFrom
abstract public void updateFrom(State state)(Code)
Update this state from the supplied state. All fields will be updated even if it is filled in on this state.
Parameters:
  state -



updateNonFilled
abstract public void updateNonFilled(State state)(Code)
Update this state from the supplied state. Only the fields not filled in on the current state and filled in on the supplied state will be updated.
Parameters:
  state -



validateForCache
public void validateForCache()(Code)
This is just for testing and will not be called in (real)runtime.



writeExternal
abstract public void writeExternal(OIDObjectOutput os) throws IOException(Code)
Our version of writeExternal for serialization.



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.