Use @QueryRedirectors
to intercept EclipseLink queries for pre- and post-processing, redirection, or performing some side effect such as auditing.
Annotation Elements
Table 2-56 describes this annotation's elements.
Table 2-56 @QueryRedirectors Annotation Elements
Annotation Element | Description | Default |
---|---|---|
|
This |
|
|
A Default |
|
insert |
A Default |
|
readAll |
A Default For users executing a JPA Query through the |
|
|
A Default For users executing a JPA Query through the |
|
|
A Default For users executing a JPA Query that contains aggregate functions or selects multiple entities this is the redirector that will be invoked |
|
|
A Default |
|
Usage
Use @QueryRedirectors
to extend the standard EclipseLink query functionality.
You can set a QueryRedirector
through the Query Hint eclipselink.query.redirector
or set as a default Redirector on an Entity.
QueryRedirectors
are used when integrating EclipseLink Grid to redirect queries to the Coherence grid.
Examples
Example 2-94 shows how to use this annotation.
Example 2-94 Using @QueryRedirectors Annotation
@QueryRedirectors( allQueries=org.queryredirectors.AllQueriesForEntity.class) @Entity public class ...
See Also
For more information, see:
"Database Queries" in the Understanding EclipseLink