public final class ConcreteStatementContext extends Object implements StatementContext
Modifier and Type | Method and Description |
---|---|
void |
addCleanable(Cleanable cleanable) |
ResultColumnMapper |
columnMapperFor(Class type)
Obtain a column mapper for the given type in this context.
|
Object |
getAttribute(String key)
Obtain the value of an attribute
|
Map<String,Object> |
getAttributes()
Obtain all the attributes associated with this context as a map.
|
Binding |
getBinding() |
Collection<Cleanable> |
getCleanables() |
Connection |
getConnection()
Obtain the JDBC connection being used for this statement
|
Foreman |
getForeman()
Obtain the Foreman that can be used to create dynamically determined Argument
instances given the registered ArgumentFactory instances.
|
String[] |
getGeneratedKeysColumnNames() |
String |
getLocatedSql()
Obtain the located sql
Not available until until statement execution time
|
String |
getRawSql()
Obtain the initial sql for the statement used to create the statement
|
String |
getRewrittenSql()
Obtain the located and rewritten sql
Not available until until statement execution time
|
Method |
getSqlObjectMethod() |
Class<?> |
getSqlObjectType() |
PreparedStatement |
getStatement()
Obtain the actual prepared statement being used.
|
boolean |
isConcurrentUpdatable()
Return if the statement should be concurrent updatable.
|
boolean |
isReturningGeneratedKeys()
Is the statement being generated expected to return the generated keys?
|
Object |
setAttribute(String key,
Object value)
Specify an attribute on the statement context
|
void |
setBinding(Binding b) |
void |
setConcurrentUpdatable(boolean concurrentUpdatable)
Set the context to create a concurrent updatable result set.
|
void |
setGeneratedKeysColumnNames(String[] generatedKeysColumnNames) |
void |
setReturningGeneratedKeys(boolean b) |
void |
setSqlObjectMethod(Method sqlObjectMethod) |
void |
setSqlObjectType(Class<?> sqlObjectType) |
public void addCleanable(Cleanable cleanable)
addCleanable
in interface StatementContext
public ResultColumnMapper columnMapperFor(Class type)
StatementContext
columnMapperFor
in interface StatementContext
type
- the target type to map topublic Object getAttribute(String key)
getAttribute
in interface StatementContext
key
- The name of the attributepublic Map<String,Object> getAttributes()
getAttributes
in interface StatementContext
public Binding getBinding()
getBinding
in interface StatementContext
public Collection<Cleanable> getCleanables()
public Connection getConnection()
getConnection
in interface StatementContext
public Foreman getForeman()
StatementContext
getForeman
in interface StatementContext
public String[] getGeneratedKeysColumnNames()
getGeneratedKeysColumnNames
in interface StatementContext
public String getLocatedSql()
getLocatedSql
in interface StatementContext
public String getRawSql()
getRawSql
in interface StatementContext
public String getRewrittenSql()
getRewrittenSql
in interface StatementContext
public Method getSqlObjectMethod()
getSqlObjectMethod
in interface StatementContext
public Class<?> getSqlObjectType()
getSqlObjectType
in interface StatementContext
public PreparedStatement getStatement()
getStatement
in interface StatementContext
public boolean isConcurrentUpdatable()
StatementContext
ResultSet.CONCUR_UPDATABLE
, otherwise the result set is not updatable,
and will have concurrency level ResultSet.CONCUR_READ_ONLY
.isConcurrentUpdatable
in interface StatementContext
public boolean isReturningGeneratedKeys()
StatementContext
isReturningGeneratedKeys
in interface StatementContext
public Object setAttribute(String key, Object value)
setAttribute
in interface StatementContext
key
- name of the attributevalue
- value for the attributepublic void setBinding(Binding b)
public void setConcurrentUpdatable(boolean concurrentUpdatable)
isReturningGeneratedKeys()
, only
one option may be selected. It does not make sense to combine these either, as one
applies to queries, and the other applies to updates.concurrentUpdatable
- if the result set should be concurrent updatable.public void setGeneratedKeysColumnNames(String[] generatedKeysColumnNames)
public void setReturningGeneratedKeys(boolean b)
public void setSqlObjectMethod(Method sqlObjectMethod)
public void setSqlObjectType(Class<?> sqlObjectType)
Copyright © 2018. All rights reserved.