org.openanzo.jdbc.utils.batchable
Interface BatchExecuter.BatchHandler

Enclosing class:
BatchExecuter

public static interface BatchExecuter.BatchHandler

Methods that get run before and after the executor executes the batchables

Author:
Joe Betz

Method Summary
 boolean onAfterBatch(java.lang.Object sender, BatchOperationQueue boq, java.util.TreeMap<java.lang.String,java.util.Map<Batchable.BatchOperation.ParamKey,java.sql.PreparedStatement>> preparedStatements)
          Method to run after executing the queue
 boolean onBeforeBatch(java.lang.Object sender, BatchOperationQueue boq, java.util.TreeMap<java.lang.String,java.util.Map<Batchable.BatchOperation.ParamKey,java.sql.PreparedStatement>> preparedStatements)
          Method to run before executing the queue
 

Method Detail

onBeforeBatch

boolean onBeforeBatch(java.lang.Object sender,
                      BatchOperationQueue boq,
                      java.util.TreeMap<java.lang.String,java.util.Map<Batchable.BatchOperation.ParamKey,java.sql.PreparedStatement>> preparedStatements)
                      throws java.sql.SQLException
Method to run before executing the queue

Parameters:
sender - object running the execute
boq - queue of batch operations
preparedStatements - set of prepared statements with operations
Returns:
true if it is ok to run the batch
Throws:
java.sql.SQLException - if there was an error with the batch operations

onAfterBatch

boolean onAfterBatch(java.lang.Object sender,
                     BatchOperationQueue boq,
                     java.util.TreeMap<java.lang.String,java.util.Map<Batchable.BatchOperation.ParamKey,java.sql.PreparedStatement>> preparedStatements)
                     throws java.sql.SQLException
Method to run after executing the queue

Parameters:
sender - object running the execute
boq - queue of batch operations
preparedStatements - set of prepared statements with operations
Returns:
true if queue was processed successfully
Throws:
java.sql.SQLException - if there was an error with the batch operations


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.