org.apache.openjpa.kernel.exps
public interface FilterListener extends java.io.Serializable
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
evaluate(java.lang.Object target,
java.lang.Class targetClass,
java.lang.Object[] args,
java.lang.Class[] argClasses,
java.lang.Object candidate,
StoreContext ctx)
Evaluate the given expression.
|
boolean |
expectsArguments()
Return true if this extension expects arguments to act on.
|
boolean |
expectsTarget()
Return true if this extension expects a target to act on.
|
java.lang.String |
getTag()
Return the tag that this extension listens for.
|
java.lang.Class |
getType(java.lang.Class targetClass,
java.lang.Class[] argClasses)
Return the expected type of the result of this listener.
|
java.lang.String getTag()
boolean expectsArguments()
field.ext:toUpperCase ()
.boolean expectsTarget()
field.ext:toUpperCase ()
acts on the target
field
but has no arguments, while another possible form,
ext:toUpperCase (field)
has no target but does have an
argument.java.lang.Object evaluate(java.lang.Object target, java.lang.Class targetClass, java.lang.Object[] args, java.lang.Class[] argClasses, java.lang.Object candidate, StoreContext ctx)
target
- the target object / field value to act on; will be
null if this extension does not expect a targettargetClass
- the expected class of the target; given in case
the target evaluates to null and typing is neededargs
- the values of the arguments given in the filter;
will be null if this extension does not expect an argumentargClasses
- the expected classes of the arguments; given in case
an argument evaluates to null and typing is neededcandidate
- the candidate object being evaluatedctx
- the persistence contextBoolean.TRUE
or Boolean.FALSE
UserException
- if this extension does not
support in-memory operationjava.lang.Class getType(java.lang.Class targetClass, java.lang.Class[] argClasses)
targetClass
- the expected class of the target, or null if no targetargClasses
- the expected classes of the arguments, or null if
no arguments