public class SQLListeners extends Object implements SQLDetailedListener
SQLListeners
is a SQLListener
implementation which dispatches the
notifications to a list of SQLListener instancesConstructor and Description |
---|
SQLListeners() |
SQLListeners(SQLListener parent) |
Modifier and Type | Method and Description |
---|---|
void |
add(SQLListener listener) |
void |
end(SQLListenerContext context)
Called at the end of a query.
|
void |
exception(SQLListenerContext context)
Called if an exception happens during query building and execution.
|
void |
executed(SQLListenerContext context)
Called at the end of
PreparedStatement execution. |
Set<SQLDetailedListener> |
getListeners() |
void |
notifyDelete(RelationalPath<?> entity,
QueryMetadata md)
Notify about a deletion
|
void |
notifyDeletes(RelationalPath<?> entity,
List<QueryMetadata> batches)
Notify about a batch deletion
|
void |
notifyInsert(RelationalPath<?> entity,
QueryMetadata md,
List<Path<?>> columns,
List<Expression<?>> values,
SubQueryExpression<?> subQuery)
Notify about an insertion
|
void |
notifyInserts(RelationalPath<?> entity,
QueryMetadata md,
List<SQLInsertBatch> batches)
Notify about a batch insertion
|
void |
notifyMerge(RelationalPath<?> entity,
QueryMetadata md,
List<Path<?>> keys,
List<Path<?>> columns,
List<Expression<?>> values,
SubQueryExpression<?> subQuery)
Notify about a merge
|
void |
notifyMerges(RelationalPath<?> entity,
QueryMetadata md,
List<SQLMergeBatch> batches)
Notify about a batch merge
|
void |
notifyQuery(QueryMetadata md)
Notify about a query
|
void |
notifyUpdate(RelationalPath<?> entity,
QueryMetadata md,
Map<Path<?>,Expression<?>> updates)
Notify about an update operation
|
void |
notifyUpdates(RelationalPath<?> entity,
List<SQLUpdateBatch> batches)
Notify about a batch update
|
void |
preExecute(SQLListenerContext context)
Called at the start of
PreparedStatement execution. |
void |
prepared(SQLListenerContext context)
Called at the end of
PreparedStatement preparation. |
void |
prePrepare(SQLListenerContext context)
Called at the start of
PreparedStatement preparation. |
void |
preRender(SQLListenerContext context)
Called at the start of SQL rendering.
|
void |
rendered(SQLListenerContext context)
Called at the end of SQL rendering.
|
void |
start(SQLListenerContext context)
Called at the start of a query.
|
public SQLListeners(SQLListener parent)
public SQLListeners()
public void add(SQLListener listener)
public void notifyQuery(QueryMetadata md)
SQLListener
notifyQuery
in interface SQLListener
md
- metadata of the querypublic void notifyDelete(RelationalPath<?> entity, QueryMetadata md)
SQLListener
notifyDelete
in interface SQLListener
entity
- table to be deleted frommd
- metadata of deletionpublic void notifyDeletes(RelationalPath<?> entity, List<QueryMetadata> batches)
SQLListener
notifyDeletes
in interface SQLListener
entity
- table to be deleted frombatches
- metadata of batchespublic void notifyMerge(RelationalPath<?> entity, QueryMetadata md, List<Path<?>> keys, List<Path<?>> columns, List<Expression<?>> values, SubQueryExpression<?> subQuery)
SQLListener
notifyMerge
in interface SQLListener
entity
- table to be mergedmd
- metadata of mergekeys
- key columnscolumns
- columns to be updated/insertedvalues
- valuessubQuery
- optional sub querypublic void notifyMerges(RelationalPath<?> entity, QueryMetadata md, List<SQLMergeBatch> batches)
SQLListener
notifyMerges
in interface SQLListener
entity
- table to be mergedmd
- metadata of mergebatches
- metadata of batchespublic void notifyInsert(RelationalPath<?> entity, QueryMetadata md, List<Path<?>> columns, List<Expression<?>> values, SubQueryExpression<?> subQuery)
SQLListener
notifyInsert
in interface SQLListener
entity
- table to be inserted intomd
- metadata of insertioncolumns
- columns to be inserted intovalues
- values to be inserted intosubQuery
- optional sub querypublic void notifyInserts(RelationalPath<?> entity, QueryMetadata md, List<SQLInsertBatch> batches)
SQLListener
notifyInserts
in interface SQLListener
entity
- table to be inserted intomd
- metadata of insertionbatches
- metadata of batchespublic void notifyUpdate(RelationalPath<?> entity, QueryMetadata md, Map<Path<?>,Expression<?>> updates)
SQLListener
notifyUpdate
in interface SQLListener
entity
- table to be updatedmd
- metadata of updateupdates
- metadata of batchespublic void notifyUpdates(RelationalPath<?> entity, List<SQLUpdateBatch> batches)
SQLListener
notifyUpdates
in interface SQLListener
entity
- table to be updatedbatches
- metadata of batchespublic void start(SQLListenerContext context)
SQLDetailedListener
start
in interface SQLDetailedListener
context
- a context object that is progressively filled out as the query executespublic void preRender(SQLListenerContext context)
SQLDetailedListener
preRender
in interface SQLDetailedListener
context
- a context object that is progressively filled out as the query executespublic void rendered(SQLListenerContext context)
SQLDetailedListener
rendered
in interface SQLDetailedListener
context
- a context object that is progressively filled out as the query executespublic void prePrepare(SQLListenerContext context)
SQLDetailedListener
PreparedStatement
preparation.prePrepare
in interface SQLDetailedListener
context
- a context object that is progressively filled out as the query executespublic void prepared(SQLListenerContext context)
SQLDetailedListener
PreparedStatement
preparation.prepared
in interface SQLDetailedListener
context
- a context object that is progressively filled out as the query executespublic void preExecute(SQLListenerContext context)
SQLDetailedListener
PreparedStatement
execution.preExecute
in interface SQLDetailedListener
context
- a context object that is progressively filled out as the query executespublic void executed(SQLListenerContext context)
SQLDetailedListener
PreparedStatement
execution.executed
in interface SQLDetailedListener
context
- a context object that is progressively filled out as the query executespublic void end(SQLListenerContext context)
SQLDetailedListener
end
in interface SQLDetailedListener
context
- a context object that is progressively filled out as the query executespublic void exception(SQLListenerContext context)
SQLDetailedListener
exception
in interface SQLDetailedListener
context
- a context object that is progressively filled out as the query executespublic Set<SQLDetailedListener> getListeners()
Copyright © 2007–2016 Querydsl. All rights reserved.