EAF 7.6 API

com.lutris.appserver.server.sql
Interface Transaction


public interface Transaction

Interface that must be implemented by objects accessed by DBTransaction.

Version:
$Revision: 1.1 $
Author:
Kyle Clark
See Also:
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

executeInsert

void executeInsert(DBConnection conn)
                   throws java.sql.SQLException
Method to insert a new object into the database.

Parameters:
conn - Database connection.
Throws:
java.sql.SQLException - If a database access error occurs.

finalizeInsert

void finalizeInsert(boolean success)
If this object's 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.

Parameters:
success - true if the transaction succeeded and this object was successfully inserted into the database.

executeUpdate

void executeUpdate(DBConnection conn)
                   throws java.sql.SQLException
Method to update contents of object in database.

Parameters:
conn - Database connection.
Throws:
java.sql.SQLException - If a database access error occurs.

finalizeUpdate

void finalizeUpdate(boolean success)
If this object's 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.

Parameters:
success - true if the transaction succeeded and this object was successfully updated in the database.

executeDelete

void executeDelete(DBConnection conn)
                   throws java.sql.SQLException
Method to delete an object from the database.

Parameters:
conn - Database connection.
Throws:
java.sql.SQLException - If a database access error occurs.

finalizeDelete

void finalizeDelete(boolean success)
If this object's executeDelete method was called then finalizeDelete is called with the status of the database transaction.

Parameters:
success - true if the transaction succeeded and this object was successfully deleted from the database.

EAF 7.6 API