public class DefaultAutoGenerateKeysStrategy extends Object implements AutoGenerateKeysStrategy
| Constructor and Description |
|---|
DefaultAutoGenerateKeysStrategy() |
| 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 |
returnsAutoGenerateKeys()
Indicates if there are auto generated keys to return
|
public boolean returnsAutoGenerateKeys()
AutoGenerateKeysStrategyreturnsAutoGenerateKeys in interface AutoGenerateKeysStrategypublic PreparedStatement prepareStatement(DbConnection connection, QueryTemplate queryTemplate) throws SQLException
AutoGenerateKeysStrategyprepareStatement in interface AutoGenerateKeysStrategyconnection - 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
AutoGenerateKeysStrategyexecute in interface AutoGenerateKeysStrategystatement - 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
AutoGenerateKeysStrategyexecuteUpdate in interface AutoGenerateKeysStrategystatement - statement to be executedqueryTemplate - query to executeSQLException - if there is any database error or this method is called on a closed StatementCopyright © 2021. All rights reserved.