|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.jpattern.orm.session.ASqlPerformer
com.googlecode.jpattern.orm.session.datasource.DataSourceSqlPerformer
public class DataSourceSqlPerformer
| Constructor Summary | |
|---|---|
DataSourceSqlPerformer(Connection conn)
|
|
| Method Summary | ||
|---|---|---|
int[] |
batchUpdate(List<String> sqls)
Issue multiple SQL updates on a single JDBC Statement using batching. |
|
int[] |
batchUpdate(String sql,
IPreparedStatementCreator psc)
Issue multiple SQL updates on a single JDBC Statement using batching. |
|
int[] |
batchUpdate(String sql,
List<Object[]> args)
Issue multiple SQL updates on a single JDBC Statement using batching. |
|
void |
execute(String sql)
Issue a single SQL execute, typically a DDL statement. |
|
int |
getMaxRows()
Return the maximum number of rows specified for this sql query. |
|
int |
getQueryTimeout()
Return the query timeout for the statements. |
|
|
query(String sql,
IResultSetReader<T> rse,
Object... args)
Execute a query given static SQL, reading the ResultSet with a IResultSetReader. |
|
void |
setMaxRows(int maxRows)
Set the maximum number of rows returnd by the execution of the sql query |
|
void |
setQueryTimeout(int queryTimeout)
Set the query timeout for the statements. |
|
int |
update(String sql,
IGeneratedKeyReader generatedKeyExtractor,
Object... args)
Issue an update statement using a PreparedStatementCreator to provide SQL and any required parameters. |
|
int |
update(String sql,
Object... args)
Perform a single SQL update operation (such as an insert, update or delete statement). |
|
| Methods inherited from class com.googlecode.jpattern.orm.session.ASqlPerformer |
|---|
queryForArray, queryForBigDecimal, queryForBoolean, queryForDouble, queryForFloat, queryForInt, queryForList, queryForLong, queryForString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataSourceSqlPerformer(Connection conn)
| Method Detail |
|---|
public void setMaxRows(int maxRows)
ISqlPerformer
public int getMaxRows()
ISqlPerformer
public void setQueryTimeout(int queryTimeout)
ISqlPerformer
public int getQueryTimeout()
ISqlPerformer
public void execute(String sql)
throws OrmException
ISqlPerformer
sql - static SQL to execute
OrmException
public <T> T query(String sql,
IResultSetReader<T> rse,
Object... args)
throws OrmException
ISqlPerformer
sql - SQL query to executerse - object that will extract all rows of resultsargs - arguments to bind to the query
OrmException
public int update(String sql,
Object... args)
throws OrmException
ISqlPerformer
sql - static SQL to executeargs - arguments to bind to the query
OrmException
public int update(String sql,
IGeneratedKeyReader generatedKeyExtractor,
Object... args)
throws OrmException
ISqlPerformer
generatedKeyExtractor - IGeneratedKeyReader to read the generated key
OrmException
public int[] batchUpdate(List<String> sqls)
throws OrmException
ISqlPerformer
OrmException
public int[] batchUpdate(String sql,
List<Object[]> args)
throws OrmException
ISqlPerformer
sql - defining a List of SQL statements that will be executed.args - defining a List of Object arrays to bind to the query.
OrmException
public int[] batchUpdate(String sql,
IPreparedStatementCreator psc)
throws OrmException
ISqlPerformer
sql - defining a List of SQL statements that will be executed.psc - the creator to bind values on the PreparedStatement
OrmException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||