org.apache.openjpa.kernel.exps
Class WildcardMatch

java.lang.Object
  extended by org.apache.openjpa.kernel.exps.WildcardMatch
All Implemented Interfaces:
Serializable, FilterListener
Direct Known Subclasses:
JDBCWildcardMatch

Deprecated. Use matches() instead.

public class WildcardMatch
extends Object
implements FilterListener

Tests if the target matches the wildcard expression given in the argument. The wildcard '?' is used to represent any single character, while '*' is used to represent any series of 0 or more characters. Examples:
"address.street.ext:wildcardMatch (\"?ain*reet\")"

See Also:
Serialized Form

Field Summary
static String TAG
          Deprecated.  
 
Constructor Summary
WildcardMatch()
          Deprecated.  
 
Method Summary
 Object evaluate(Object target, Class targetClass, Object[] args, Class[] argClasses, Object candidate, StoreContext ctx)
          Deprecated. Evaluate the given expression.
 boolean expectsArguments()
          Deprecated. Return true if this extension expects arguments to act on.
 boolean expectsTarget()
          Deprecated. Return true if this extension expects a target to act on.
 String getTag()
          Deprecated. Return the tag that this extension listens for.
 Class getType(Class targetClass, Class[] argClasses)
          Deprecated. Return the expected type of the result of this listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG

public static final String TAG
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

WildcardMatch

public WildcardMatch()
Deprecated. 
Method Detail

getTag

public String getTag()
Deprecated. 
Description copied from interface: FilterListener
Return the tag that this extension listens for.

Specified by:
getTag in interface FilterListener

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 interface FilterListener

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 target field but has no arguments, while another possible form, ext:toUpperCase (field) has no target but does have an argument.

Specified by:
expectsTarget in interface FilterListener

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 interface FilterListener
Parameters:
target - the target object / field value to act on; will be null if this extension does not expect a target
targetClass - the expected class of the target; given in case the target evaluates to null and typing is needed
args - the values of the arguments given in the filter; will be null if this extension does not expect an argument
argClasses - the expected classes of the arguments; given in case an argument evaluates to null and typing is needed
candidate - the candidate object being evaluated
ctx - the persistence context
Returns:
the value of the extension for this candidate; if this extension is an expression, this method should return Boolean.TRUE or Boolean.FALSE

getType

public Class getType(Class targetClass,
                     Class[] argClasses)
Deprecated. 
Description copied from interface: FilterListener
Return the expected type of the result of this listener.

Specified by:
getType in interface FilterListener
Parameters:
targetClass - the expected class of the target, or null if no target
argClasses - the expected classes of the arguments, or null if no arguments


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.