Package org.apache.openjpa.kernel.exps
Class StringContains
java.lang.Object
org.apache.openjpa.kernel.exps.StringContains
- All Implemented Interfaces:
Serializable
,FilterListener
- Direct Known Subclasses:
JDBCStringContains
Deprecated.
Tests if the target contains the given argument. The argument must be
a constant.
Examples:
"address.street.ext:stringContains (\"main\")"
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionevaluate
(Object target, Class targetClass, Object[] args, Class[] argClasses, Object candidate, StoreContext ctx) Deprecated.Evaluate the given expression.boolean
Deprecated.Return true if this extension expects arguments to act on.boolean
Deprecated.Return true if this extension expects a target to act on.getTag()
Deprecated.Return the tag that this extension listens for.Deprecated.Return the expected type of the result of this listener.
-
Field Details
-
TAG
Deprecated.- See Also:
-
-
Constructor Details
-
StringContains
public StringContains()Deprecated.
-
-
Method Details
-
getTag
Deprecated.Description copied from interface:FilterListener
Return the tag that this extension listens for.- Specified by:
getTag
in interfaceFilterListener
-
expectsArguments
public boolean expectsArguments()Deprecated.Description copied from interface:FilterListener
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 ()
.- Specified by:
expectsArguments
in interfaceFilterListener
-
expectsTarget
public boolean expectsTarget()Deprecated.Description copied from interface:FilterListener
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 targetfield
but has no arguments, while another possible form,ext:toUpperCase (field)
has no target but does have an argument.- Specified by:
expectsTarget
in interfaceFilterListener
-
evaluate
public Object evaluate(Object target, Class targetClass, Object[] args, Class[] argClasses, Object candidate, StoreContext ctx) Deprecated.Description copied from interface:FilterListener
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.- Specified by:
evaluate
in interfaceFilterListener
- Parameters:
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 context- Returns:
- the value of the extension for this candidate; if
this extension is an expression, this method should
return
Boolean.TRUE
orBoolean.FALSE
-
getType
Deprecated.Description copied from interface:FilterListener
Return the expected type of the result of this listener.- Specified by:
getType
in interfaceFilterListener
- Parameters:
targetClass
- the expected class of the target, or null if no targetargClasses
- the expected classes of the arguments, or null if no arguments
-
matches()
instead.