|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jpattern.orm.session.NullSqlExecutor
public class NullSqlExecutor
| Constructor Summary | |
|---|---|
NullSqlExecutor()
|
|
| Method Summary | ||
|---|---|---|
int[] |
batchUpdate(List<String> sqls)
Issue multiple SQL updates on a single JDBC Statement using batching. |
|
int[] |
batchUpdate(String sql,
BatchPreparedStatementSetter 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,
ResultSetReader<T> rse,
Collection<?> args)
Execute a query given static SQL, reading the ResultSet with a IResultSetReader. |
|
|
query(String sql,
ResultSetReader<T> rse,
Object... args)
Execute a query given static SQL, reading the ResultSet with a IResultSetReader. |
|
|
query(String sql,
ResultSetRowReader<T> rsrr,
Collection<?> args)
Execute a query given static SQL, reading the ResultSet with a ResultSetRowReader. |
|
|
query(String sql,
ResultSetRowReader<T> rsrr,
Object... args)
Execute a query given static SQL, reading the ResultSet with a ResultSetRowReader. |
|
Object[] |
queryForArray(String sql,
Collection<?> args)
Execute a query given static SQL and read the result creating an ordered array with the extracted column values (return null if no rows are returned) |
|
Object[] |
queryForArray(String sql,
Object... args)
Execute a query given static SQL and read the result creating an ordered array with the extracted column values (return null if no rows are returned) |
|
BigDecimal |
queryForBigDecimal(String sql,
Collection<?> args)
Execute a query given static SQL and read the result as a BigDecimal value (return null if no rows are returned) |
|
BigDecimal |
queryForBigDecimal(String sql,
Object... args)
Execute a query given static SQL and read the result as a BigDecimal value (return null if no rows are returned) |
|
Boolean |
queryForBoolean(String sql,
Collection<?> args)
Execute a query given static SQL and read the result as a boolean value (return null if no rows are returned) |
|
Boolean |
queryForBoolean(String sql,
Object... args)
Execute a query given static SQL and read the result as a boolean value (return null if no rows are returned) |
|
Double |
queryForDouble(String sql,
Collection<?> args)
Execute a query given static SQL and read the result as a double value (return null if no rows are returned) |
|
Double |
queryForDouble(String sql,
Object... args)
Execute a query given static SQL and read the result as a double value (return null if no rows are returned) |
|
Float |
queryForFloat(String sql,
Collection<?> args)
Execute a query given static SQL and read the result as a float value (return null if no rows are returned) |
|
Float |
queryForFloat(String sql,
Object... args)
Execute a query given static SQL and read the result as a float value (return null if no rows are returned) |
|
Integer |
queryForInt(String sql,
Collection<?> args)
Execute a query given static SQL and read the result as an int value (return null if no rows are returned) |
|
Integer |
queryForInt(String sql,
Object... args)
Execute a query given static SQL and read the result as an int value (return null if no rows are returned) |
|
List<Object[]> |
queryForList(String sql,
Collection<?> args)
Execute a query given static SQL and read the result creating a List of all the ordered arrays with the extracted column values for every row. |
|
List<Object[]> |
queryForList(String sql,
Object... args)
Execute a query given static SQL and read the result creating a List of all the ordered arrays with the extracted column values for every row. |
|
Long |
queryForLong(String sql,
Collection<?> args)
Execute a query given static SQL and read the result as an long value (return null if no rows are returned) |
|
Long |
queryForLong(String sql,
Object... args)
Execute a query given static SQL and read the result as an long value (return null if no rows are returned) |
|
String |
queryForString(String sql,
Collection<?> args)
Execute a query given static SQL and read the result as a String value (return null if no rows are returned) |
|
String |
queryForString(String sql,
Object... args)
Execute a query given static SQL and read the result as a String value (return null if no rows are returned) |
|
|
queryForUnique(String sql,
ResultSetRowReader<T> rsrr,
Collection<?> args)
Execute a query given static SQL, reading the ResultSet with a ResultSetRowReader. |
|
|
queryForUnique(String sql,
ResultSetRowReader<T> rsrr,
Object... args)
Execute a query given static SQL, reading the ResultSet with a ResultSetRowReader. |
|
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,
Collection<?> args)
Perform a single SQL update operation (such as an insert, update or delete statement). |
|
int |
update(String sql,
GeneratedKeyReader generatedKeyReader,
Collection<?> args)
Issue an update statement using a PreparedStatementCreator to provide SQL and any required parameters. |
|
int |
update(String sql,
GeneratedKeyReader generatedKeyExtractor,
Object... args)
Issue an update statement using a PreparedStatementCreator to provide SQL and any required parameters. |
|
int |
update(String sql,
GeneratedKeyReader generatedKeyReader,
PreparedStatementSetter psc)
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). |
|
int |
update(String sql,
PreparedStatementSetter psc)
Perform a single SQL update operation (such as an insert, update or delete statement). |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NullSqlExecutor()
| Method Detail |
|---|
public void setMaxRows(int maxRows)
SqlPerformer
setMaxRows in interface SqlPerformerpublic int getMaxRows()
SqlPerformer
getMaxRows in interface SqlPerformerpublic void setQueryTimeout(int queryTimeout)
SqlPerformer
setQueryTimeout in interface SqlPerformerpublic int getQueryTimeout()
SqlPerformer
getQueryTimeout in interface SqlPerformer
public void execute(String sql)
throws OrmException
SqlPerformer
execute in interface SqlPerformersql - static SQL to execute
OrmException
public <T> T query(String sql,
ResultSetReader<T> rse,
Object... args)
throws OrmException
SqlPerformer
query in interface SqlPerformersql - 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
SqlPerformer
update in interface SqlPerformersql - static SQL to executeargs - arguments to bind to the query
OrmException
public int update(String sql,
GeneratedKeyReader generatedKeyExtractor,
Object... args)
throws OrmException
SqlPerformer
update in interface SqlPerformergeneratedKeyExtractor - IGeneratedKeyReader to read the generated key
OrmException
public int[] batchUpdate(List<String> sqls)
throws OrmException
SqlPerformer
batchUpdate in interface SqlPerformerOrmException
public int[] batchUpdate(String sql,
List<Object[]> args)
throws OrmException
SqlPerformer
batchUpdate in interface SqlPerformersql - 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,
BatchPreparedStatementSetter psc)
throws OrmException
SqlPerformer
batchUpdate in interface SqlPerformersql - defining a List of SQL statements that will be executed.psc - the creator to bind values on the PreparedStatement
OrmException
public Integer queryForInt(String sql,
Object... args)
throws OrmException
SqlPerformer
queryForInt in interface SqlPerformersql - SQL query to executeargs - arguments to bind to the query
OrmNotUniqueResultException - if more than one row is returned from the query
OrmException
public Long queryForLong(String sql,
Object... args)
throws OrmException
SqlPerformer
queryForLong in interface SqlPerformersql - SQL query to executeargs - arguments to bind to the query
OrmNotUniqueResultException - if more than one row is returned from the query
OrmException
public Double queryForDouble(String sql,
Object... args)
throws OrmException
SqlPerformer
queryForDouble in interface SqlPerformersql - SQL query to executeargs - arguments to bind to the query
OrmNotUniqueResultException - if more than one row is returned from the query
OrmException
public Float queryForFloat(String sql,
Object... args)
throws OrmException
SqlPerformer
queryForFloat in interface SqlPerformersql - SQL query to executeargs - arguments to bind to the query
OrmNotUniqueResultException - if more than one row is returned from the query
OrmException
public String queryForString(String sql,
Object... args)
throws OrmException
SqlPerformer
queryForString in interface SqlPerformersql - SQL query to executeargs - arguments to bind to the query
OrmNotUniqueResultException - if more than one row is returned from the query
OrmException
public Boolean queryForBoolean(String sql,
Object... args)
throws OrmException
SqlPerformer
queryForBoolean in interface SqlPerformersql - SQL query to executeargs - arguments to bind to the query
OrmNotUniqueResultException - if more than one row is returned from the query
OrmException
public BigDecimal queryForBigDecimal(String sql,
Object... args)
throws OrmException
SqlPerformer
queryForBigDecimal in interface SqlPerformersql - SQL query to executeargs - arguments to bind to the query
OrmNotUniqueResultException - if more than one row is returned from the query
OrmException
public Object[] queryForArray(String sql,
Object... args)
throws OrmException
SqlPerformer
queryForArray in interface SqlPerformersql - SQL query to executeargs - arguments to bind to the query
OrmNotUniqueResultException - if more than one row is returned from the query
OrmException
public List<Object[]> queryForList(String sql,
Object... args)
throws OrmException
SqlPerformer
queryForList in interface SqlPerformersql - SQL query to executeargs - arguments to bind to the query
OrmException
public int update(String sql,
PreparedStatementSetter psc)
throws OrmException
SqlPerformer
update in interface SqlPerformersql - static SQL to execute
OrmException
public int update(String sql,
GeneratedKeyReader generatedKeyReader,
PreparedStatementSetter psc)
throws OrmException
SqlPerformer
update in interface SqlPerformersql - static SQL to execute
OrmException
public <T> T query(String sql,
ResultSetReader<T> rse,
Collection<?> args)
throws OrmException
SqlPerformer
query in interface SqlPerformersql - SQL query to executerse - object that will extract all rows of resultsargs - arguments to bind to the query
OrmException
public Integer queryForInt(String sql,
Collection<?> args)
throws OrmException,
OrmNotUniqueResultException
SqlPerformer
queryForInt in interface SqlPerformersql - SQL query to executeargs - arguments to bind to the query
OrmNotUniqueResultException - if more than one row is returned from the query
OrmException
public Long queryForLong(String sql,
Collection<?> args)
throws OrmException,
OrmNotUniqueResultException
SqlPerformer
queryForLong in interface SqlPerformersql - SQL query to executeargs - arguments to bind to the query
OrmNotUniqueResultException - if more than one row is returned from the query
OrmException
public Double queryForDouble(String sql,
Collection<?> args)
throws OrmException,
OrmNotUniqueResultException
SqlPerformer
queryForDouble in interface SqlPerformersql - SQL query to executeargs - arguments to bind to the query
OrmNotUniqueResultException - if more than one row is returned from the query
OrmException
public Float queryForFloat(String sql,
Collection<?> args)
throws OrmException,
OrmNotUniqueResultException
SqlPerformer
queryForFloat in interface SqlPerformersql - SQL query to executeargs - arguments to bind to the query
OrmNotUniqueResultException - if more than one row is returned from the query
OrmException
public String queryForString(String sql,
Collection<?> args)
throws OrmException,
OrmNotUniqueResultException
SqlPerformer
queryForString in interface SqlPerformersql - SQL query to executeargs - arguments to bind to the query
OrmNotUniqueResultException - if more than one row is returned from the query
OrmException
public Boolean queryForBoolean(String sql,
Collection<?> args)
throws OrmException,
OrmNotUniqueResultException
SqlPerformer
queryForBoolean in interface SqlPerformersql - SQL query to executeargs - arguments to bind to the query
OrmNotUniqueResultException - if more than one row is returned from the query
OrmException
public BigDecimal queryForBigDecimal(String sql,
Collection<?> args)
throws OrmException,
OrmNotUniqueResultException
SqlPerformer
queryForBigDecimal in interface SqlPerformersql - SQL query to executeargs - arguments to bind to the query
OrmNotUniqueResultException - if more than one row is returned from the query
OrmException
public Object[] queryForArray(String sql,
Collection<?> args)
throws OrmException,
OrmNotUniqueResultException
SqlPerformer
queryForArray in interface SqlPerformersql - SQL query to executeargs - arguments to bind to the query
OrmNotUniqueResultException - if more than one row is returned from the query
OrmException
public List<Object[]> queryForList(String sql,
Collection<?> args)
throws OrmException
SqlPerformer
queryForList in interface SqlPerformersql - SQL query to executeargs - arguments to bind to the query
OrmException
public int update(String sql,
Collection<?> args)
throws OrmException
SqlPerformer
update in interface SqlPerformersql - static SQL to executeargs - arguments to bind to the query
OrmException
public int update(String sql,
GeneratedKeyReader generatedKeyReader,
Collection<?> args)
throws OrmException
SqlPerformer
update in interface SqlPerformergeneratedKeyReader - IGeneratedKeyReader to read the generated key
OrmException
public <T> List<T> query(String sql,
ResultSetRowReader<T> rsrr,
Object... args)
throws OrmException
SqlPerformerResultSetRowReader.
query in interface SqlPerformersql - SQL query to executersrr - object that will extract all rows of resultsargs - arguments to bind to the query
ResultSetRowReader
OrmException
public <T> List<T> query(String sql,
ResultSetRowReader<T> rsrr,
Collection<?> args)
throws OrmException
SqlPerformerResultSetRowReader.
query in interface SqlPerformersql - SQL query to executersrr - object that will extract all rows of resultsargs - arguments to bind to the query
ResultSetRowReader
OrmException
public <T> T queryForUnique(String sql,
ResultSetRowReader<T> rsrr,
Object... args)
throws OrmException,
OrmNotUniqueResultException
SqlPerformerResultSetRowReader.
queryForUnique in interface SqlPerformersql - SQL query to executersrr - object that will extract th result's rowargs - arguments to bind to the query
ResultSetRowReader
OrmNotUniqueResultException - if not exactly one row is returned by the query execution
OrmException
public <T> T queryForUnique(String sql,
ResultSetRowReader<T> rsrr,
Collection<?> args)
throws OrmException
SqlPerformerResultSetRowReader.
queryForUnique in interface SqlPerformersql - SQL query to executersrr - object that will extract th result's rowargs - arguments to bind to the query
ResultSetRowReader
OrmNotUniqueResultException - if not exactly one row is returned by the query execution
OrmException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||