Class SQLListenerContextImpl
- All Implemented Interfaces:
SQLListenerContext
INTERNAL USE ONLY - SQLDetailedListener implementations are not expected to use this
class directly
-
Constructor Summary
ConstructorsConstructorDescriptionSQLListenerContextImpl(QueryMetadata metadata) SQLListenerContextImpl(QueryMetadata metadata, Connection connection) SQLListenerContextImpl(QueryMetadata metadata, Connection connection, RelationalPath<?> entity) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPreparedStatement(PreparedStatement preparedStatement) voidaddSQL(SQLBindings sql) Return the underlying sql collection including bindings if the query is a batch queryReturn the underlying connection if there is oneThe context getData is a general purpose place that listeners can place objects.Return the underlying entity affectedReturn the underlying exception that has happened during query executionReturn the underlying query metadataReturn the underlying prepared statement or the first if its batch queryReturn the underlying set of prepared statementsgetSQL()Return the underlying sql or first in a batch queryReturn the underlying sql including bindings or first in a batch queryReturn the underlying sql collection if the query is a batch queryvoidsetConnection(Connection connection) voidThe context setData is a general purpose place that listeners can place objects.voidsetEntity(RelationalPath<?> entity) voidsetException(Exception exception) toString()
-
Constructor Details
-
SQLListenerContextImpl
public SQLListenerContextImpl(QueryMetadata metadata, Connection connection, RelationalPath<?> entity) -
SQLListenerContextImpl
-
SQLListenerContextImpl
-
-
Method Details
-
addSQL
-
setEntity
-
setConnection
-
setException
-
addPreparedStatement
-
getMetadata
Description copied from interface:SQLListenerContextReturn the underlying query metadata- Specified by:
getMetadatain interfaceSQLListenerContext- Returns:
- the underlying query metadata
-
getEntity
Description copied from interface:SQLListenerContextReturn the underlying entity affectedNOTE : This can be null depending on the stage of the query execution
- Specified by:
getEntityin interfaceSQLListenerContext- Returns:
- the underlying entity affected
-
getSQL
Description copied from interface:SQLListenerContextReturn the underlying sql or first in a batch queryNOTE : This can be null depending on the stage of the query execution
- Specified by:
getSQLin interfaceSQLListenerContext- Returns:
- the underlying sql or first in a batch query
-
getSQLBindings
Description copied from interface:SQLListenerContextReturn the underlying sql including bindings or first in a batch queryNOTE : This can be null depending on the stage of the query execution
- Specified by:
getSQLBindingsin interfaceSQLListenerContext- Returns:
- the underlying sql including bindings or first in a batch query
-
getSQLStatements
Description copied from interface:SQLListenerContextReturn the underlying sql collection if the query is a batch queryNOTE : This can be empty depending on the stage of the query execution
- Specified by:
getSQLStatementsin interfaceSQLListenerContext- Returns:
- the underlying sql collection if the query is a batch query
-
getAllSQLBindings
Description copied from interface:SQLListenerContextReturn the underlying sql collection including bindings if the query is a batch queryNOTE : This can be empty depending on the stage of the query execution
- Specified by:
getAllSQLBindingsin interfaceSQLListenerContext- Returns:
- the underlying sql collection including bindings if the query is a batch query
-
getException
Description copied from interface:SQLListenerContextReturn the underlying exception that has happened during query executionNOTE : This can be null depending on whether an exception occurred
- Specified by:
getExceptionin interfaceSQLListenerContext- Returns:
- the underlying exception that has happened during query execution
-
getConnection
Description copied from interface:SQLListenerContextReturn the underlying connection if there is oneNOTE : This can be null depending on the stage of the query execution
- Specified by:
getConnectionin interfaceSQLListenerContext- Returns:
- the underlying connection if there is one
-
getPreparedStatements
Description copied from interface:SQLListenerContextReturn the underlying set of prepared statementsNOTE : This can be empty depending on the stage of the query execution
- Specified by:
getPreparedStatementsin interfaceSQLListenerContext- Returns:
- the underlying set of prepared statements
-
getPreparedStatement
Description copied from interface:SQLListenerContextReturn the underlying prepared statement or the first if its batch queryNOTE : This can be null depending on the stage of the query execution
- Specified by:
getPreparedStatementin interfaceSQLListenerContext- Returns:
- the underlying prepared statement or the first if its batch query
-
getData
Description copied from interface:SQLListenerContextThe context getData is a general purpose place that listeners can place objects. It allows listeners to pass context between themselves during callbacks.- Specified by:
getDatain interfaceSQLListenerContext- Parameters:
dataKey- the key to look up- Returns:
- the context object under that key
-
setData
Description copied from interface:SQLListenerContextThe context setData is a general purpose place that listeners can place objects. It allows listeners to pass context between themselves during callbacks.A good time to place objects into the context is during
SQLDetailedListener.start(SQLListenerContext)and then access if after that.- Specified by:
setDatain interfaceSQLListenerContext- Parameters:
dataKey- the key to usevalue- the value to place under that key
-
toString
-