public interface Context<C extends Context<C>>
BindContext
,
RenderContext
Modifier and Type | Method and Description |
---|---|
Configuration |
configuration()
The configuration wrapped by this context.
|
Map<Object,Object> |
data()
Get all custom data from this
Context . |
Object |
data(Object key)
Get some custom data from this
Context . |
Object |
data(Object key,
Object value)
Set some custom data to this
Context . |
boolean |
declareFields()
Whether the current context is rendering a SQL field declaration (e.g. a
Field in the SELECT clause of the query). |
C |
declareFields(boolean declareFields)
Set the new context value for
declareFields() |
boolean |
declareTables()
Whether the current context is rendering a SQL table declaration (e.g. a
Table in the FROM or JOIN clause of the
query). |
C |
declareTables(boolean declareTables)
Set the new context value for
declareTables() |
int |
nextIndex()
Get the next bind index.
|
int |
peekIndex()
Peek the next bind index.
|
boolean |
subquery()
Whether the current context is rendering a sub-query (nested query)
|
C |
subquery(boolean subquery)
Set the new context value for
subquery() |
Configuration configuration()
Map<Object,Object> data()
Context
.
This is custom data that was previously set to the context using
data(Object, Object)
. Use custom data if you want to pass data
to QueryPart
objects for a given RenderContext
or
BindContext
.
Unlike Configuration.data()
, these data's lifecycle only
matches that of a render or bind context.
null
Object data(Object key)
Context
.
This is custom data that was previously set to the context using
data(Object, Object)
. Use custom data if you want to pass data
to QueryPart
objects for a given RenderContext
or
BindContext
.
Unlike Configuration.data()
, these data's lifecycle only
matches that of a render or bind context.
key
- A key to identify the custom datanull
if no such data is contained
in this ExecuteContext
ExecuteListener
Object data(Object key, Object value)
Context
.
This is custom data that was previously set to the context using
data(Object, Object)
. Use custom data if you want to pass data
to QueryPart
objects for a given RenderContext
or
BindContext
.
Unlike Configuration.data()
, these data's lifecycle only
matches that of a render or bind context.
key
- A key to identify the custom datavalue
- The custom data or null
to unset the custom
datanull
if no data
was previously set for the given keyExecuteListener
boolean declareFields()
Field
in the SELECT
clause of the query).C declareFields(boolean declareFields)
declareFields()
boolean declareTables()
Table
in the FROM
or JOIN
clause of the
query).C declareTables(boolean declareTables)
declareTables()
boolean subquery()
C subquery(boolean subquery)
subquery()
int nextIndex()
PreparedStatement
. Client code
must assure that calling nextIndex()
is followed by setting a
bind value to BindContext.statement()
RenderContext.namedParams()
being to true
int peekIndex()
nextIndex()
Copyright © 2013. All Rights Reserved.