org.skife.jdbi.v2
Class Update

java.lang.Object
  extended by org.skife.jdbi.v2.SQLStatement<Update>
      extended by org.skife.jdbi.v2.Update

public class Update
extends SQLStatement<Update>

Used for INSERT, UPDATE, and DELETE statements


Method Summary
 int execute()
          Execute the statement
 GeneratedKeys<Map<String,Object>> executeAndReturnGeneratedKeys()
           
<GeneratedKeyType>
GeneratedKeys<GeneratedKeyType>
executeAndReturnGeneratedKeys(ResultSetMapper<GeneratedKeyType> mapper)
          Execute the statement and returns any auto-generated keys.
 
Methods inherited from class org.skife.jdbi.v2.SQLStatement
addStatementCustomizer, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bindASCIIStream, bindASCIIStream, bindAsInt, bindAsInt, bindAsInt, bindAsInt, bindBinaryStream, bindBinaryStream, bindBySqlType, bindBySqlType, bindFromMap, bindFromProperties, bindNamedArgumentFinder, bindNull, bindNull, define, define, getConcreteContext, getConnection, getContext, getLog, getParameters, getParams, getRewriter, getSql, getStatementBuilder, getStatementCustomizers, getStatementLocator, getTimingCollector, internalExecute, setFetchDirection, setQueryTimeout, setStatementLocator, setStatementRewriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

execute

public int execute()
Execute the statement

Returns:
the number of rows modified

executeAndReturnGeneratedKeys

public GeneratedKeys<Map<String,Object>> executeAndReturnGeneratedKeys()

executeAndReturnGeneratedKeys

public <GeneratedKeyType> GeneratedKeys<GeneratedKeyType> executeAndReturnGeneratedKeys(ResultSetMapper<GeneratedKeyType> mapper)
Execute the statement and returns any auto-generated keys. This requires the JDBC driver to support the Statement.getGeneratedKeys() method.

Parameters:
mapper - the mapper to generate the resulting key object
Returns:
the generated key or null if none was returned


Copyright © 2011. All Rights Reserved.