WebObjects 5.4.2

com.webobjects.eocontrol
Interface EOQualifier.Comparison

Enclosing class:
EOQualifier

public static interface EOQualifier.Comparison

The EOQualifierComparison interface defines methods for comparing values. These methods are used for evaluating qualifiers in memory.

In Java Client, support for these methods is provided for String, Number, and Date using EOQualifier.ComparisonSupport. You should implement this interface for any value classes you write that you want to be evaluated in memory by EOQualifier instances.


Method Summary
 boolean doesContain(Object other)
          Returns true if the receiver contains other, false if it doesn't.
 boolean isCaseInsensitiveLike(Object other)
          Returns true if the receiver is a case insensitive match for other, false if it isn't.
 boolean isEqualTo(Object other)
          Invokes equals and returns the result.
 boolean isGreaterThan(Object other)
          Invokes compare and returns true if the result is NSComparator.
 boolean isGreaterThanOrEqualTo(Object other)
          Invokes compare and returns true if the result is NSComparator.
 boolean isLessThan(Object other)
          Invokes compare and returns true if the result is NSComparator.OrderedAscending .
 boolean isLessThanOrEqualTo(Object other)
          Invokes compare and returns true if the result is NSComparator.
 boolean isLike(Object other)
          Returns true if receiver matches other according to the semantics of the SQL like comparison operator, false if it doesn't.
 boolean isNotEqualTo(Object other)
          Invokes equals, inverts the result, and returns it.
 

Method Detail

isEqualTo

boolean isEqualTo(Object other)
Invokes equals and returns the result. This method is used in the framework only by EOQualifier for in-memory evaluation.

Parameters:
other - The input object
Returns:
true if the input is same as the receiver, else false

isNotEqualTo

boolean isNotEqualTo(Object other)
Invokes equals, inverts the result, and returns it. This method is used in the Framework only by EOQualifier for in-memory evaluation.

Parameters:
other - The input object
Returns:
true if receiver matches anObject according to the semantics of the SQL like comparison operator, false if it doesn't

isLessThan

boolean isLessThan(Object other)
Invokes compare and returns true if the result is NSComparator.OrderedAscending . This method is used in the Framework only by EOQualifier for in-memory evaluation.

Parameters:
other - The input object
Returns:
true if the input object is less than the receiver false otherwise

isGreaterThan

boolean isGreaterThan(Object other)
Invokes compare and returns true if the result is NSComparator. OrderedDescending. This method is used in the Framework only by EOQualifier for in-memory evaluation.

Parameters:
other - The input object
Returns:
true if the input object is greater than the receiver false otherwise

isLessThanOrEqualTo

boolean isLessThanOrEqualTo(Object other)
Invokes compare and returns true if the result is NSComparator. OrderedAscending or NSComparator.OrderedSame. This method is used in the Framework only by EOQualifier for in-memory evaluation.

Parameters:
other - The input object
Returns:
true if the input object is less than or equal to the receiver false otherwise

isGreaterThanOrEqualTo

boolean isGreaterThanOrEqualTo(Object other)
Invokes compare and returns true if the result is NSComparator. OrderedDescending or NSComparator.OrderedSame. This method is used in the Framework only by EOQualifier for in-memory evaluation.

Parameters:
other - The input object
Returns:
true if the input object is greater than or equal to the receiver false otherwise

doesContain

boolean doesContain(Object other)
Returns true if the receiver contains other, false if it doesn't.

Parameters:
other - The input object
Returns:
true if the receiver contains anObject, false if it doesn't

isLike

boolean isLike(Object other)
Returns true if receiver matches other according to the semantics of the SQL like comparison operator, false if it doesn't. This method is used in the Framework only by EOQualifier for in-memory evaluation.

Parameters:
other - The input object
Returns:
true if receiver matches anObject according to the semantics of the SQL like comparison operator, false if it doesn't

isCaseInsensitiveLike

boolean isCaseInsensitiveLike(Object other)
Returns true if the receiver is a case insensitive match for other, false if it isn't.

Using Wildcards and the like Operator When you use the like or caseInsensitiveLike operator in a qualifier expression, you can use the wildcard characters * and ? to perform pattern matching, for example:

 "lastName like 'Jo *'"
 

matches Jones, Johnson, Jolsen, Josephs, and so on.

The ? character just matches a single character, for example:

 "lastName like 'Jone?'"
 

matches Jones.

The asterisk character (*) is only interpreted as a wildcard in expressions that use the like or caseInsensitiveLike operator. For example, in the following statement, the asterisk is treated as a literal value, not as a wildcard:

          quot;lastName = 'Jo *'"
 

Parameters:
other - The input object
Returns:
true if the receiver is a case insensitive match for anObject, false if it isn't.

Last updated June 2008

Copyright © 2000-2008 Apple Inc.