public interface SQLListenerContext
SQLDetailedListener
callback methodModifier and Type | Method and Description |
---|---|
Connection |
getConnection()
Return the underlying connection if there is one
|
Object |
getData(String dataKey)
The context getData is a general purpose place that listeners can place objects.
|
RelationalPath<?> |
getEntity()
Return the underlying entity affected
|
Exception |
getException()
Return the underlying exception that has happened during query execution
|
QueryMetadata |
getMetadata()
Return the underlying query metadata
|
PreparedStatement |
getPreparedStatement()
Return the underlying prepared statement or the first if its batch query
|
Collection<PreparedStatement> |
getPreparedStatements()
Return the underlying set of prepared statements
|
String |
getSQL()
Return the underlying sql or first in a batch query
|
Collection<String> |
getSQLStatements()
Return the underlying sql collection if the query is a batch query
|
void |
setData(String dataKey,
Object value)
The context setData is a general purpose place that listeners can place objects.
|
Object getData(String dataKey)
dataKey
- the key to look upvoid setData(String dataKey, Object value)
A good time to place objects into the context is during SQLDetailedListener.start(SQLListenerContext)
and then access if after that.
dataKey
- the key to usevalue
- the value to place under that keyQueryMetadata getMetadata()
String getSQL()
NOTE : This can be null depending on the stage of the query execution
Collection<String> getSQLStatements()
NOTE : This can be empty depending on the stage of the query execution
RelationalPath<?> getEntity()
NOTE : This can be null depending on the stage of the query execution
Connection getConnection()
NOTE : This can be null depending on the stage of the query execution
Exception getException()
NOTE : This can be null depending on whether an exception occurred
PreparedStatement getPreparedStatement()
NOTE : This can be null depending on the stage of the query execution
Collection<PreparedStatement> getPreparedStatements()
NOTE : This can be empty depending on the stage of the query execution
Copyright © 2007–2016 Querydsl. All rights reserved.