| org.apache.openjpa.kernel.exps.FilterListener
All known Subclasses: org.apache.openjpa.kernel.exps.StringContains, org.apache.openjpa.kernel.exps.WildcardMatch,
FilterListener | public interface FilterListener extends Serializable(Code) | | A filter listener extends expression filters with custom functionality.
author: Steve Kim author: Abe White |
evaluate | public Object evaluate(Object target, Class targetClass, Object[] args, Class[] argClasses, Object candidate, StoreContext ctx)(Code) | | Evaluate the given expression. This method is used when
evaluating in-memory expressions. The method used when evaluating
data store expressions will change depending on the data store in use.
Parameters: target - the target object / field value to act on; will benull if this extension does not expect a target Parameters: targetClass - the expected class of the target; given in casethe target evaluates to null and typing is needed Parameters: args - the values of the arguments given in the filter;will be null if this extension does not expect an argument Parameters: argClasses - the expected classes of the arguments; given in casean argument evaluates to null and typing is needed Parameters: candidate - the candidate object being evaluated Parameters: ctx - the persistence context the value of the extension for this candidate; ifthis extension is an expression, this method shouldreturn Boolean.TRUE or Boolean.FALSE throws: org.apache.openjpa.util.UserException - if this extension does not support in-memory operation |
expectsArguments | public boolean expectsArguments()(Code) | | Return true if this extension expects arguments to act on. Some
extensions may not need arguments; for example, an extension to
switch a string to upper case might be of the form:
field.ext:toUpperCase () .
|
expectsTarget | public boolean expectsTarget()(Code) | | Return true if this extension expects a target to act on. Some
extensions act on a field or object value; others stand alone.
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.
|
getTag | public String getTag()(Code) | | Return the tag that this extension listens for.
|
getType | public Class getType(Class targetClass, Class[] argClasses)(Code) | | Return the expected type of the result of this listener.
Parameters: targetClass - the expected class of the target, or null if no target Parameters: argClasses - the expected classes of the arguments, or null ifno arguments |
|
|