com.onewebsql.util.jdbc
Class BatchUpdateOp<PH>

java.lang.Object
  extended by com.onewebsql.util.jdbc.BatchUpdateOp<PH>
All Implemented Interfaces:
ConnectionOp<List<Integer>>

public class BatchUpdateOp<PH>
extends Object
implements ConnectionOp<List<Integer>>

Implements a batch update JDBC operation as an object of type com.onewebsql.util.ConnectionOp.


Constructor Summary
BatchUpdateOp(String updateStatement, Collection<PH> parameters, ParameterHandler<PH> parameterHandler)
          Constructor.
 
Method Summary
 List<Integer> invoke(Connection con)
          Invokes the operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchUpdateOp

public BatchUpdateOp(String updateStatement,
                     Collection<PH> parameters,
                     ParameterHandler<PH> parameterHandler)
Constructor.

Parameters:
updateStatement - update statement
parameters - collection of parameter objects, each element contains SQL query parameters of a single operation
parameterHandler - an object which binds parameters to a SQL query for a single element of parameters collection.
Method Detail

invoke

public List<Integer> invoke(Connection con)
                     throws SQLException
Description copied from interface: ConnectionOp
Invokes the operation.

Specified by:
invoke in interface ConnectionOp<List<Integer>>
Parameters:
con - database connection
Returns:
result of the operation
Throws:
SQLException - if an exception is thrown


Copyright © 2011-2013 e-point SA. All Rights Reserved.