public class PreparedBatch extends SQLStatement<PreparedBatch>
Modifier and Type | Method and Description |
---|---|
PreparedBatchPart |
add()
Add a statement (part) to this batch.
|
PreparedBatchPart |
add(Map<String,? extends Object> args)
Create a new batch part by binding values looked up in
args to
named parameters on the statement. |
PreparedBatch |
add(Object... args) |
protected void |
addCleanable(Cleanable cleanable) |
protected void |
addCustomizer(StatementCustomizer customizer) |
protected void |
addCustomizers(Collection<StatementCustomizer> customizers) |
protected void |
afterExecution(PreparedStatement stmt) |
protected void |
beforeExecution(PreparedStatement stmt) |
protected void |
cleanup() |
PreparedBatch |
define(Map<String,? extends Object> values)
Adds all key/value pairs in the Map to the
StatementContext . |
PreparedBatch |
define(String key,
Object value)
Specify a value on the statement context for this batch
|
int[] |
execute()
Execute the batch
|
<GeneratedKeyType> |
executeAndGenerateKeys(ResultColumnMapper<GeneratedKeyType> mapper) |
<GeneratedKeyType> |
executeAndGenerateKeys(ResultColumnMapper<GeneratedKeyType> mapper,
String... columnNames) |
<GeneratedKeyType> |
executeAndGenerateKeys(ResultSetMapper<GeneratedKeyType> mapper) |
<GeneratedKeyType> |
executeAndGenerateKeys(ResultSetMapper<GeneratedKeyType> mapper,
String... columnNames) |
protected ConcreteStatementContext |
getConcreteContext() |
StatementContext |
getContext()
Obtain the statement context associated with this statement
|
protected Foreman |
getForeman() |
protected Binding |
getParams() |
int |
getSize()
The number of statements which are in this batch
|
protected Collection<StatementCustomizer> |
getStatementCustomizers() |
int |
size()
The number of statements which are in this batch
|
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, cleanupHandle, cleanupHandle, clearBindings, dynamicBind, getContainerMapperRegistry, getHandle, getLog, getRewriter, getSql, getStatementBuilder, getStatementLocator, getTimingCollector, internalExecute, registerArgumentFactory, registerContainerFactory, setFetchDirection, setFetchDirection2, setQueryTimeout, setStatementLocator, setStatementLocator2, setStatementRewriter, setStatementRewriter2
public PreparedBatchPart add()
public PreparedBatchPart add(Map<String,? extends Object> args)
args
to
named parameters on the statement.args
- map to bind arguments from for named parameters on the statementpublic PreparedBatch add(Object... args)
public PreparedBatch define(Map<String,? extends Object> values)
StatementContext
.define
in class SQLStatement<PreparedBatch>
values
- containing key/value pairs.public PreparedBatch define(String key, Object value)
define
in class SQLStatement<PreparedBatch>
key
- Key to access this value from the StatementContextvalue
- Value to setAttribute on the StatementContextpublic int[] execute()
public <GeneratedKeyType> GeneratedKeys<GeneratedKeyType> executeAndGenerateKeys(ResultColumnMapper<GeneratedKeyType> mapper)
public <GeneratedKeyType> GeneratedKeys<GeneratedKeyType> executeAndGenerateKeys(ResultColumnMapper<GeneratedKeyType> mapper, String... columnNames)
public <GeneratedKeyType> GeneratedKeys<GeneratedKeyType> executeAndGenerateKeys(ResultSetMapper<GeneratedKeyType> mapper)
public <GeneratedKeyType> GeneratedKeys<GeneratedKeyType> executeAndGenerateKeys(ResultSetMapper<GeneratedKeyType> mapper, String... columnNames)
protected Binding getParams()
getParams
in class SQLStatement<PreparedBatch>
public int getSize()
public int size()
protected void addCleanable(Cleanable cleanable)
protected void addCustomizer(StatementCustomizer customizer)
protected void addCustomizers(Collection<StatementCustomizer> customizers)
protected final void afterExecution(PreparedStatement stmt)
protected final void beforeExecution(PreparedStatement stmt)
protected final void cleanup()
protected final ConcreteStatementContext getConcreteContext()
public final StatementContext getContext()
protected final Foreman getForeman()
protected Collection<StatementCustomizer> getStatementCustomizers()
Copyright © 2018. All rights reserved.