com.jpattern.orm.session.datasource
Class DataSourceSqlPerformerStrategy

java.lang.Object
  extended by com.jpattern.orm.session.datasource.DataSourceSqlPerformerStrategy
All Implemented Interfaces:
IConnectionCaller, SqlPerformerStrategy

public class DataSourceSqlPerformerStrategy
extends Object
implements SqlPerformerStrategy, IConnectionCaller

Author:
Francesco Cina 02/lug/2011 ISqlExecutor implementation using java.sql.Connection as backend.

Constructor Summary
DataSourceSqlPerformerStrategy(DataSourceSessionProvider dataSourceSessionProvider)
           
 
Method Summary
 int[] batchUpdate(List<String> sqls, int timeout)
           
 int[] batchUpdate(String sql, BatchPreparedStatementSetter psc, int timeout)
           
 int[] batchUpdate(String sql, List<Object[]> args, int timeout)
           
 void execute(String sql, int timeout)
           
<T> T
query(String sql, int timeout, int maxRows, PreparedStatementSetter pss, ResultSetReader<T> rse)
           
 int update(String sql, int timeout, GeneratedKeyReader generatedKeyExtractor, PreparedStatementSetter pss)
           
 int update(String sql, int timeout, PreparedStatementSetter pss)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceSqlPerformerStrategy

public DataSourceSqlPerformerStrategy(DataSourceSessionProvider dataSourceSessionProvider)
Method Detail

execute

public void execute(String sql,
                    int timeout)
             throws OrmException
Specified by:
execute in interface SqlPerformerStrategy
Throws:
OrmException

query

public <T> T query(String sql,
                   int timeout,
                   int maxRows,
                   PreparedStatementSetter pss,
                   ResultSetReader<T> rse)
        throws OrmException
Specified by:
query in interface SqlPerformerStrategy
Throws:
OrmException

update

public int update(String sql,
                  int timeout,
                  PreparedStatementSetter pss)
           throws OrmException
Specified by:
update in interface SqlPerformerStrategy
Throws:
OrmException

update

public int update(String sql,
                  int timeout,
                  GeneratedKeyReader generatedKeyExtractor,
                  PreparedStatementSetter pss)
           throws OrmException
Specified by:
update in interface SqlPerformerStrategy
Throws:
OrmException

batchUpdate

public int[] batchUpdate(List<String> sqls,
                         int timeout)
                  throws OrmException
Specified by:
batchUpdate in interface SqlPerformerStrategy
Throws:
OrmException

batchUpdate

public int[] batchUpdate(String sql,
                         List<Object[]> args,
                         int timeout)
                  throws OrmException
Specified by:
batchUpdate in interface SqlPerformerStrategy
Throws:
OrmException

batchUpdate

public int[] batchUpdate(String sql,
                         BatchPreparedStatementSetter psc,
                         int timeout)
                  throws OrmException
Specified by:
batchUpdate in interface SqlPerformerStrategy
Throws:
OrmException


Copyright © 2013. All Rights Reserved.