net.wotonomy.control
Class EOKeyValueQualifier

java.lang.Object
  extended by net.wotonomy.control.EOQualifier
      extended by net.wotonomy.control.EOKeyValueQualifier
All Implemented Interfaces:
EOKeyValueArchiving, EOQualifierEvaluation

public class EOKeyValueQualifier
extends EOQualifier
implements EOKeyValueArchiving, EOQualifierEvaluation

EOKeyValueQualifier performs a property-based comparison against a specified value. The comparison is specified in the form of a NSSelector. The selector is expected to take two arguments, the property value on an object and the comparison value, and return a Boolean indicating whether the object is qualified. EOQualifier defines selectors that may be used in creating EOKeyValueQualifiers.

Version:
$Revision: 894 $
Author:
michael@mpowers.net, yjcheung@intersectsoft.com, $Author: cgruber $

Field Summary
 
Fields inherited from class net.wotonomy.control.EOQualifier
QualifierOperatorCaseInsensitiveLike, QualifierOperatorContains, QualifierOperatorEqual, QualifierOperatorGreaterThan, QualifierOperatorGreaterThanOrEqualTo, QualifierOperatorLessThan, QualifierOperatorLessThanOrEqualTo, QualifierOperatorLike, QualifierOperatorNotEqual
 
Constructor Summary
EOKeyValueQualifier(java.lang.String aKey, net.wotonomy.foundation.NSSelector aSelector, java.lang.Object aValue)
          Constructor specifying a property key, a selector, and a value for comparison.
 
Method Summary
static java.lang.Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver arch)
           
 void encodeWithKeyValueArchiver(EOKeyValueArchiver arch)
           
 boolean evaluateWithObject(java.lang.Object anObject)
          Evaluates this qualifier for the specified object, and returns whether the object is qualified.
 java.lang.String key()
          Returns the key for this qualifier.
 net.wotonomy.foundation.NSSelector selector()
          Returns the selector for this qualifier.
 java.lang.String toString()
          Returns a string representation of this qualifier.
 java.lang.Object value()
          Returns the value for this qualifier.
 
Methods inherited from class net.wotonomy.control.EOQualifier
addQualifierKeysToSet, allQualifierKeys, allQualifierOperators, bindingKeys, filterArrayWithQualifier, filteredArrayWithQualifier, keyPathForBindingKey, operatorSelectorForString, qualifierToMatchAllValues, qualifierToMatchAnyValue, qualifierWithBindings, qualifierWithQualifierFormat, relationalQualifierOperators, stringForOperatorSelector, validateKeysWithRootClassDescription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EOKeyValueQualifier

public EOKeyValueQualifier(java.lang.String aKey,
                           net.wotonomy.foundation.NSSelector aSelector,
                           java.lang.Object aValue)
Constructor specifying a property key, a selector, and a value for comparison. The selector may be one of the constant selectors defined on EOQualifier.

Method Detail

key

public java.lang.String key()
Returns the key for this qualifier.


selector

public net.wotonomy.foundation.NSSelector selector()
Returns the selector for this qualifier.


value

public java.lang.Object value()
Returns the value for this qualifier.


evaluateWithObject

public boolean evaluateWithObject(java.lang.Object anObject)
Evaluates this qualifier for the specified object, and returns whether the object is qualified. selector() is invoked on the value for key() on the specified object, with value() as the parameter.

Specified by:
evaluateWithObject in interface EOQualifierEvaluation
Overrides:
evaluateWithObject in class EOQualifier

toString

public java.lang.String toString()
Returns a string representation of this qualifier.

Overrides:
toString in class EOQualifier

encodeWithKeyValueArchiver

public void encodeWithKeyValueArchiver(EOKeyValueArchiver arch)
Specified by:
encodeWithKeyValueArchiver in interface EOKeyValueArchiving

decodeWithKeyValueUnarchiver

public static java.lang.Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver arch)


Copyright © 2006 null. All Rights Reserved.