public class SQLListenerContextImpl extends Object implements SQLListenerContext
INTERNAL USE ONLY - SQLDetailedListener implementations are not expected to use this
class directly
| Constructor and Description |
|---|
SQLListenerContextImpl(QueryMetadata metadata) |
SQLListenerContextImpl(QueryMetadata metadata,
Connection connection) |
SQLListenerContextImpl(QueryMetadata metadata,
Connection connection,
RelationalPath<?> entity) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPreparedStatement(PreparedStatement preparedStatement) |
void |
addSQL(String sql) |
Connection |
getConnection()
NOTE : This can be null depending on the stage of the query execution
|
Object |
getData(String dataKey)
The context getData is a general purpose place that listeners can place objects.
|
RelationalPath<?> |
getEntity()
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
|
QueryMetadata |
getMetadata() |
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
|
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
|
void |
setConnection(Connection connection) |
void |
setData(String dataKey,
Object value)
The context setData is a general purpose place that listeners can place objects.
|
void |
setEntity(RelationalPath<?> entity) |
void |
setException(Exception exception) |
String |
toString() |
public SQLListenerContextImpl(QueryMetadata metadata, Connection connection, RelationalPath<?> entity)
public SQLListenerContextImpl(QueryMetadata metadata, Connection connection)
public SQLListenerContextImpl(QueryMetadata metadata)
public void addSQL(String sql)
public void setEntity(RelationalPath<?> entity)
public void setConnection(Connection connection)
public void setException(Exception exception)
public void addPreparedStatement(PreparedStatement preparedStatement)
public QueryMetadata getMetadata()
getMetadata in interface SQLListenerContextpublic RelationalPath<?> getEntity()
SQLListenerContextgetEntity in interface SQLListenerContextpublic String getSQL()
SQLListenerContextgetSQL in interface SQLListenerContextpublic Collection<String> getSQLStatements()
SQLListenerContextgetSQLStatements in interface SQLListenerContextpublic Exception getException()
SQLListenerContextgetException in interface SQLListenerContextpublic Connection getConnection()
SQLListenerContextgetConnection in interface SQLListenerContextpublic Collection<PreparedStatement> getPreparedStatements()
SQLListenerContextgetPreparedStatements in interface SQLListenerContextpublic PreparedStatement getPreparedStatement()
SQLListenerContextgetPreparedStatement in interface SQLListenerContextpublic Object getData(String dataKey)
SQLListenerContextgetData in interface SQLListenerContextdataKey - the key to look uppublic void setData(String dataKey, Object value)
SQLListenerContext
A good time to place objects into the context is during SQLDetailedListener.start(SQLListenerContext)
and then access if after that.
setData in interface SQLListenerContextdataKey - the key to usevalue - the value to place under that keyCopyright © 2007–2015 Mysema Ltd. All rights reserved.