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