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()
AutoGeneratedKeyStrategyreturnsAutoGeneratedKeys in interface AutoGeneratedKeyStrategypublic PreparedStatement prepareStatement(DbConnection connection, QueryTemplate queryTemplate) throws SQLException
AutoGeneratedKeyStrategyprepareStatement in interface AutoGeneratedKeyStrategyconnection - 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
AutoGeneratedKeyStrategyexecute in interface AutoGeneratedKeyStrategystatement - 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
AutoGeneratedKeyStrategyexecuteUpdate in interface AutoGeneratedKeyStrategystatement - statement to be executedqueryTemplate - query to executeSQLException - if there is any database error or this method is called on a closed StatementCopyright © 2003–2020 MuleSoft, Inc.. All rights reserved.