Dedication
To my wife Tina,whose emotional and financial supportmade this book possible;and to Jennifer and Jeremy, who now think that their daddy has become addicted to his computer.
David Jordan
To Kathy, Chris, Ali, and Juliana.
Craig Russell
[] BigDecimal BigInteger Boolean boolean Boolean boolean Byte byte Byte byte
|
[] char Character class metadata attributes close() Collection collection metadata attributes connection-factory property
|
[] Date Double double Double double
|
[] ejb-jar element extension metadata attributes
|
[] field metadata attributes Float float Float float
|
[] getIgnoreCache() getMultithreaded() getNontransactionalRead() getNontransactionalWrite() getObjectId() getOptimistic() getPersistenceManager() getPersistenceManagerFactory() getRestoreValues() getRetainValues() getTransactionalObjectId()
|
[] Locale Long long Long long
|
[] Map map metadata attributes metadata element
|
[] name attribute name attribute Number
|
[] package metadata attribute
|
[] setMultithreaded() setNontransactionalRead() setNontransactionalWrite() setOptimistic() setRestoreValues() setRetainValues() Short short Short short size() SQL functions String
|
Appendix A. Lifecycle States and Transitions
specifies the values returned by the JDOHelper lifecycle state interrogation methodsfor all the JDO lifecycle states.
Table A-1. Lifecycle-state interrogation methods
State of instance | isPersistent() | isTransactional() | isDirty() | isNew() | isDeleted() |
---|
Transient | false | false | false | false | false |
Transient-clean | false | true | false | false | false |
Transient-dirty | false | true | true | false | false |
Hollow | true | false | false | false | false |
Persistent-nontransactional | true | false | false | false | false |
Persistent-new | true | true | true | true | false |
Persistent-clean | true | true | false | false | false |
Persistent-dirty | true | true | true | false | false |
Persistent-deleted | true | true | true | false | true |
Persistent-new-deleted | true | true | true | true | true |
contain the state transitions for everylifecycle state.
Table A-2. Lifecycle-state transitions
| Current state |
---|
Method | Transient | P-new | P-clean | P-dirty | Hollow |
---|
makePersistent | P-new | unchanged | unchanged | unchanged | unchanged |
deletePersistent | error | P-new-del | P-del | P-del | P-del |
makeTransactional | T-clean | unchanged | unchanged | unchanged | P-clean |
makeNontransactional | error | error | P-nontrans | error | unchanged |
makeTransient | unchanged | error | Transient | error | Transient |
commit withRetainValues = false | unchanged | Hollow | Hollow | Hollow | unchanged |
commit withRetainValues = true | unchanged | P-nontrans | P-nontrans | P-nontrans | unchanged |
rollback with RestoreValues = false | unchanged | Transient | Hollow | Hollow | unchanged |
rollback with RestoreValues = true | unchanged | Transient | P-nontrans | P-nontrans | unchanged |
refresh with active datastore transaction | unchanged | unchanged | unchanged | P-clean | unchanged |
refresh with active optimistic transaction | unchanged | unchanged | unchanged | P-nontrans | unchanged |
evict | n/a | unchanged | Hollow | unchanged | unchanged |
read field outsideof a transaction | unchanged | impossible | impossible | impossible | P-nontrans |
read field with active optimistic transaction | unchanged | unchanged | unchanged | unchanged | P-nontrans |
read field with active datastore transaction | unchanged | unchanged | unchanged | unchanged | P-clean |
write field or makeDirty outside of a transaction | unchanged | impossible | impossible | impossible | P-nontrans |
write field or makeDirty with active transaction | unchanged | unchanged | P-dirty | unchanged | P-dirty |
retrieve outside of a transaction or with active optimistictransaction | unchanged | unchanged | unchanged | unchanged | P-nontrans |
retrieve with active datastore transaction | unchanged | unchanged | unchanged | unchanged | P-clean |
error: a JDOUserException is thrown; the statedoes not change
Table A-3. Lifecycle-state transitions (continued)
Next page