com.onewebsql.util.jdbc
Class QueryOp<PH,RH>

java.lang.Object
  extended by com.onewebsql.util.jdbc.QueryOp<PH,RH>
All Implemented Interfaces:
ConnectionOp<List<RH>>

public class QueryOp<PH,RH>
extends Object
implements ConnectionOp<List<RH>>

Operation which invokes a SQL query.


Constructor Summary
QueryOp(String query, PH parameters, ParameterHandler<PH> parameterHandler, RowHandler<RH> rowHandler)
          Constructor.
 
Method Summary
 List<RH> 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

QueryOp

public QueryOp(String query,
               PH parameters,
               ParameterHandler<PH> parameterHandler,
               RowHandler<RH> rowHandler)
Constructor.

Parameters:
query - SQL query
parameters - SQL query parameters
parameterHandler - object which converts between Java™ objects and database java.sql.PreparedStatement parameters
rowHandler - object which converts ResultSet object into a Java object.
Method Detail

invoke

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

Specified by:
invoke in interface ConnectionOp<List<RH>>
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.