|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
A persistence session must be opened (by calling PersistenceManager.openSession before
performing any other persistence operation. It can be considered analagous to
a transaction in a database environment.
PersistenceManager| Method Summary | |
void |
cancel()
Cancel all operations performed in this session. |
void |
close()
Commit any changes made in this transaction to the data store. |
java.sql.Connection |
getConnection()
Access the data connection wrapped by this persistence session. |
java.lang.Object |
getSystemSession()
Return a system-specific (i.e. |
| Method Detail |
public void cancel()
throws PersistenceException
Cancel all operations performed in this session. These operations should
then be rolled back in close
PersistenceException - if the session cannot be cancelled for any reason.
public void close()
throws PersistenceException
Commit any changes made in this transaction to the data store. You must
call this method after performing persistence methods - use it within a
finally block as shown in the example code.
TODO: link to demo code reference here.
PersistenceException - if the session cannot be closed/committed for any reason.
public java.sql.Connection getConnection()
throws PersistenceException
Access the data connection wrapped by this persistence session. You should think twice before using this method - not all implementations of a persistence layer may use a database, and therefore this may not always be appropriate.
PersistenceException - if the database connection cannot be retrieved for any reason
(including lack of support by the underlying persistence
layer).public java.lang.Object getSystemSession()
PersistenceManager.openSession is called with an object
parameter.
null if none was
set.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||