|
EAF 7.6 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Transaction
Interface that must be implemented by objects accessed by DBTransaction.
DBTransaction
Method Summary | |
---|---|
void |
executeDelete(DBConnection conn)
Method to delete an object from the database. |
void |
executeInsert(DBConnection conn)
Method to insert a new object into the database. |
void |
executeUpdate(DBConnection conn)
Method to update contents of object in database. |
void |
finalizeDelete(boolean success)
If this object's executeDelete method was
called then finalizeDelete is called with
the status of the database transaction. |
void |
finalizeInsert(boolean success)
If this object's executeInsert method was
called then finalizeInsert is called with
the status of the database transaction. |
void |
finalizeUpdate(boolean success)
If this object's executeUpdate method was
called then finalizeUpdate is called with
the status of the database transaction. |
Method Detail |
---|
void executeInsert(DBConnection conn) throws java.sql.SQLException
conn
- Database connection.
java.sql.SQLException
- If a database access error
occurs.void finalizeInsert(boolean success)
executeInsert
method was
called then finalizeInsert
is called with
the status of the database transaction. This method
allows the data object to perform any post processing
if the transaction succeeded or failed.
success
- true if the transaction succeeded
and this object was successfully inserted into the database.void executeUpdate(DBConnection conn) throws java.sql.SQLException
conn
- Database connection.
java.sql.SQLException
- If a database access error
occurs.void finalizeUpdate(boolean success)
executeUpdate
method was
called then finalizeUpdate
is called with
the status of the database transaction.
For instance the data object may want to
increment its version number once it has successfully
been commited to the database.
success
- true if the transaction succeeded
and this object was successfully updated in the database.void executeDelete(DBConnection conn) throws java.sql.SQLException
conn
- Database connection.
java.sql.SQLException
- If a database access error
occurs.void finalizeDelete(boolean success)
executeDelete
method was
called then finalizeDelete
is called with
the status of the database transaction.
success
- true if the transaction succeeded
and this object was successfully deleted from the
database.
|
EAF 7.6 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |