WebObjects 5.2.3

com.webobjects.eocontrol
Interface EOQualifier.Comparison

Enclosing interface:
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

doesContain

public 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

isCaseInsensitiveLike

public 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.

isEqualTo

public 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

isGreaterThan

public 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

isGreaterThanOrEqualTo

public 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

isLessThan

public 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

isLessThanOrEqualTo

public 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

isLike

public 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

isNotEqualTo

public 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

Last updated Thu Oct 21 15:04:16 PDT 2004.

Copyright © 2004 Apple Computer, Inc.