public interface VisitContext
QueryPart
traversal passed to registered
VisitListener
's.VisitListener
Modifier and Type | Method and Description |
---|---|
BindContext |
bindContext()
|
Clause |
clause()
The most recent clause that was encountered through
Context.start(Clause) . |
Clause[] |
clauses()
A path of clauses going through the visiting tree.
|
int |
clausesLength()
This is the same as calling
clauses() .length . |
Configuration |
configuration()
The configuration wrapped by this context.
|
Context<?> |
context()
The underlying
RenderContext or BindContext object. |
Map<Object,Object> |
data()
Get all custom data from this
VisitContext . |
Object |
data(Object key)
Get some custom data from this
VisitContext . |
Object |
data(Object key,
Object value)
Set some custom data to this
VisitContext . |
QueryPart |
queryPart()
The most recent
QueryPart that was encountered through
Context.visit(QueryPart) . |
void |
queryPart(QueryPart part)
Replace the most recent
QueryPart that was encountered through
Context.visit(QueryPart) . |
QueryPart[] |
queryParts()
A path of
QueryPart s going through the visiting tree. |
int |
queryPartsLength()
This is the same as calling
queryParts() .length . |
RenderContext |
renderContext()
|
Map<Object,Object> data()
VisitContext
.
This corresponds to Context.data()
returned from
context()
.
null
VisitListener
Object data(Object key)
VisitContext
.
This corresponds to Context.data(Object)
returned from
context()
.
key
- A key to identify the custom datanull
if no such data is contained
in this VisitListener
VisitListener
Object data(Object key, Object value)
VisitContext
.
This corresponds to Context.data(Object, Object)
returned from
context()
.
key
- A key to identify the custom datavalue
- The custom datanull
if no data
was previously set for the given keyVisitContext
Configuration configuration()
Clause clause()
Context.start(Clause)
.Clause[] clauses()
This returns all previous clauses that were encountered through
Context.start(Clause)
and that haven't been removed yet through
Context.end(Clause)
. In other words, VisitContext
contains a stack of clauses.
int clausesLength()
clauses()
.length
.QueryPart queryPart()
QueryPart
that was encountered through
Context.visit(QueryPart)
.void queryPart(QueryPart part)
QueryPart
that was encountered through
Context.visit(QueryPart)
.
This method can be called by VisitListener
implementation
methods, in particular by VisitListener.visitStart(VisitContext)
.
part
- The new QueryPart
.QueryPart[] queryParts()
QueryPart
s going through the visiting tree.
This returns all previous QueryParts
that were encountered
through Context.visit(QueryPart)
. In other words,
VisitContext
contains a stack of QueryParts
.
int queryPartsLength()
queryParts()
.length
.Context<?> context()
RenderContext
or BindContext
object.RenderContext renderContext()
RenderContext
or null
, if the
underlying context is a BindContext
.
[#2694] [#2695] As of jOOQ 3.2, the QueryPart
traversal SPI
through VisitListener
is only implemented for
RenderContext
. Hence, you may need to inline bind values if
applicable.
BindContext bindContext() throws UnsupportedOperationException
UnsupportedOperationException
- [#2694] [#2695] As of jOOQ 3.2,
this method is not yet implemented as QueryPart
traversal SPI through VisitListener
is only
implemented for RenderContext
Copyright © 2014. All Rights Reserved.