|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.module.db.internal.domain.statement.QueryStatementFactory
public class QueryStatementFactory
Creates Statement based on the type and parameters of a given query:
_CallableStatement for stored p rocedure queries
_PreparedStatement for queries with input parameters
_Standard Statement otherwise
| Constructor Summary | |
|---|---|
QueryStatementFactory()
|
|
| Method Summary | |
|---|---|
Statement |
create(DbConnection connection,
QueryTemplate queryTemplate)
Creates a JDBC statement |
Statement |
create(DbConnection connection,
QueryTemplate queryTemplate,
AutoGeneratedKeyStrategy autoGeneratedKeyStrategy)
Creates a JDBC statement with auto generated keys processing |
void |
setFetchSize(int size)
Indicates how many rows should fetched from the database any time more rows are requested on any resultSet returned by a statement created by this factory |
void |
setMaxRows(int max)
Sets the maximum numbers of rows that will be returned by any resultSet returned by a statement created by this factory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public QueryStatementFactory()
| Method Detail |
|---|
public Statement create(DbConnection connection,
QueryTemplate queryTemplate)
throws SQLException
StatementFactory
create in interface StatementFactoryconnection - connection uses to create the statementqueryTemplate - query template that will be execute on the statement
SQLException - if a database access error occurs or this method is called on a closed connection
public Statement create(DbConnection connection,
QueryTemplate queryTemplate,
AutoGeneratedKeyStrategy autoGeneratedKeyStrategy)
throws SQLException
StatementFactory
create in interface StatementFactoryconnection - connection uses to create the statementqueryTemplate - query template that will be execute on the statementautoGeneratedKeyStrategy - strategy to process auto generated keys
SQLException - if a database access error occurs or this method is called on a closed connectionpublic void setMaxRows(int max)
ConfigurableStatementFactory
setMaxRows in interface ConfigurableStatementFactorymax - the new max rows limit; zero means there is no limitpublic void setFetchSize(int size)
ConfigurableStatementFactory
setFetchSize in interface ConfigurableStatementFactorysize - the number of rows to fetch
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||