public class ColumnIndexAutoGeneratedKeyStrategy extends Object implements AutoGeneratedKeyStrategy
Constructor and Description |
---|
ColumnIndexAutoGeneratedKeyStrategy(int[] columnIndexes) |
Modifier and Type | Method and Description |
---|---|
boolean |
execute(Statement statement,
QueryTemplate queryTemplate)
Executes a query that can return multiple results
|
int |
executeUpdate(Statement statement,
QueryTemplate queryTemplate)
Executes an update query
|
PreparedStatement |
prepareStatement(DbConnection connection,
QueryTemplate queryTemplate)
Prepares a statement in order to return auto generated keys
|
boolean |
returnsAutoGeneratedKeys()
Indicates if there are auto generated keys to return
|
public ColumnIndexAutoGeneratedKeyStrategy(int[] columnIndexes)
public boolean returnsAutoGeneratedKeys()
AutoGeneratedKeyStrategy
returnsAutoGeneratedKeys
in interface AutoGeneratedKeyStrategy
public PreparedStatement prepareStatement(DbConnection connection, QueryTemplate queryTemplate) throws SQLException
AutoGeneratedKeyStrategy
prepareStatement
in interface AutoGeneratedKeyStrategy
connection
- connection uses to prepare the statementqueryTemplate
- query template to be preparedSQLException
- if there is any error preparing the querypublic boolean execute(Statement statement, QueryTemplate queryTemplate) throws SQLException
AutoGeneratedKeyStrategy
execute
in interface AutoGeneratedKeyStrategy
statement
- statement to be executedqueryTemplate
- query to executeSQLException
- if there is any database error or this method is called on a closed Statementpublic int executeUpdate(Statement statement, QueryTemplate queryTemplate) throws SQLException
AutoGeneratedKeyStrategy
executeUpdate
in interface AutoGeneratedKeyStrategy
statement
- statement to be executedqueryTemplate
- query to executeSQLException
- if there is any database error or this method is called on a closed StatementCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.