com.bowstreet.builders.webapp.methods
Interface SqlTransaction


public interface SqlTransaction

Interface for all builder helper classes that implement runtime functionality to execute a series of named JDBC Statements as a transaction.

Version:
1.0 9/17/02
Author:
David Gawron

Method Summary
 void commit(WebAppAccess webAppAccess)
          Method used to commit any pending changes in the database and free all of the runtime resources allocated as the transaction steps were executed.
 void execute(WebAppAccess webAppAccess)
          Method used to execute all of the SQL statements defined in the transaction.
 void execute(WebAppAccess webAppAccess, java.lang.String stepName)
          Method used to execute a specific step defined in the transaction.
 void initialize(WebAppAccess webAppAccess)
          Method used to initialize the helper class with the current set of values for the indirect references that were used to define the builder's inputs.
 void rollback(WebAppAccess webAppAccess)
          Method used to rollback any pending changes in the database and free all of the runtime resources allocated as the transaction steps were executed.
 

Method Detail

commit

void commit(WebAppAccess webAppAccess)
            throws java.sql.SQLException
Method used to commit any pending changes in the database and free all of the runtime resources allocated as the transaction steps were executed.

Parameters:
webAppAccess - The WebApp instance for the request.
Throws:
java.sql.SQLException - If the transaction cannot be committed. Typically this exeception will have a detailed error message from the database on why the various SQL statements executed for the transaction could not be committed.

execute

void execute(WebAppAccess webAppAccess)
             throws java.sql.SQLException
Method used to execute all of the SQL statements defined in the transaction.

Parameters:
webAppAccess - The WebApp instance for the request.
Throws:
java.sql.SQLException - If the execution of a transaction step runs into a problem a SQLException will be thrown. Typically this exeception will have a detailed error message from the database on why the SQL statement executed for the transaction step failed.

execute

void execute(WebAppAccess webAppAccess,
             java.lang.String stepName)
             throws java.sql.SQLException
Method used to execute a specific step defined in the transaction. Each SQL statement that's executed as part of a transaction has a step name. This method allows a caller to execute specific transactions steps in any order and as many times as necessary, all under the same transaction context.

Parameters:
webAppAccess - The WebApp instance for the request.
stepName - The name of the transaction step (SQL statement) to be executed. WebAppRuntimeException will be thrown if the step is not defined in the transaction.
Throws:
java.sql.SQLException - If the execution of a transaction step runs into a problem a SQLException will be thrown. Typically this exeception will have a detailed error message from the database on why the SQL statement executed for the transaction step failed.

initialize

void initialize(WebAppAccess webAppAccess)
Method used to initialize the helper class with the current set of values for the indirect references that were used to define the builder's inputs.

Parameters:
webAppAccess - The web app access instance for the request. If NULL, the the class will re-initialize itself with the values it already has.

rollback

void rollback(WebAppAccess webAppAccess)
              throws java.sql.SQLException
Method used to rollback any pending changes in the database and free all of the runtime resources allocated as the transaction steps were executed.

Parameters:
webAppAccess - The WebApp instance for the request.
Throws:
java.sql.SQLException - If the transaction cannot be rolled back. Typically this exeception will have a detailed error message from the database on why the various SQL statements executed for the transaction could not be rolled back.


Copyright © 2009 IBM. All Rights Reserved.