Project Wonder 5.0

er.extensions.eof.qualifiers
Class ERXBetweenQualifier

java.lang.Object
  extended by com.webobjects.eocontrol.EOQualifier
      extended by com.webobjects.eocontrol.EOKeyValueQualifier
          extended by er.extensions.qualifiers.ERXKeyValueQualifier
              extended by er.extensions.eof.qualifiers.ERXBetweenQualifier
All Implemented Interfaces:
com.webobjects.eocontrol.EOKeyValueArchiving, com.webobjects.eocontrol.EOQualifierEvaluation, com.webobjects.foundation.NSCoding, IERXChainableQualifier, java.io.Serializable, java.lang.Cloneable

public class ERXBetweenQualifier
extends ERXKeyValueQualifier
implements com.webobjects.eocontrol.EOQualifierEvaluation, java.lang.Cloneable

The between qualifier allows qualification on an attribute that is between two values. This qualifier supports both in-memory and sql based qualification. The SQL generated is of the form: "FOO BETWEEN 1 AND 3" Note this qualifier supports qualifing against String, Number and NSTimestamp values.

See Also:
Serialized Form

Nested Class Summary
static class ERXBetweenQualifier.BetweenQualifierSQLGenerationSupport
           
 
Nested classes/interfaces inherited from class com.webobjects.eocontrol.EOQualifier
com.webobjects.eocontrol.EOQualifier.Comparison, com.webobjects.eocontrol.EOQualifier.ComparisonSupport, com.webobjects.eocontrol.EOQualifier.QualifierVariableSubstitutionException
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSCoding
com.webobjects.foundation.NSCoding._BigDecimalSupport, com.webobjects.foundation.NSCoding._BigIntegerSupport, com.webobjects.foundation.NSCoding._BooleanSupport, com.webobjects.foundation.NSCoding._ByteSupport, com.webobjects.foundation.NSCoding._CharacterSupport, com.webobjects.foundation.NSCoding._DateSupport, com.webobjects.foundation.NSCoding._DoubleSupport, com.webobjects.foundation.NSCoding._FloatSupport, com.webobjects.foundation.NSCoding._IntegerSupport, com.webobjects.foundation.NSCoding._LongSupport, com.webobjects.foundation.NSCoding._NumberSupport, com.webobjects.foundation.NSCoding._ShortSupport, com.webobjects.foundation.NSCoding._StringSupport, com.webobjects.foundation.NSCoding.Support
 
Nested classes/interfaces inherited from interface com.webobjects.eocontrol.EOKeyValueArchiving
com.webobjects.eocontrol.EOKeyValueArchiving._NullValueSupport, com.webobjects.eocontrol.EOKeyValueArchiving._NumberSupport, com.webobjects.eocontrol.EOKeyValueArchiving._TimestampSupport, com.webobjects.eocontrol.EOKeyValueArchiving.Awaking, com.webobjects.eocontrol.EOKeyValueArchiving.FinishInitialization, com.webobjects.eocontrol.EOKeyValueArchiving.Support
 
Field Summary
 
Fields inherited from class com.webobjects.eocontrol.EOKeyValueQualifier
_CLASS, _lowercaseCache, _selector, _value
 
Fields inherited from class com.webobjects.eocontrol.EOQualifier
QualifierOperatorCaseInsensitiveLike, QualifierOperatorContains, QualifierOperatorEqual, QualifierOperatorGreaterThan, QualifierOperatorGreaterThanOrEqualTo, QualifierOperatorLessThan, QualifierOperatorLessThanOrEqualTo, QualifierOperatorLike, QualifierOperatorNotEqual
 
Fields inherited from interface com.webobjects.eocontrol.EOQualifierEvaluation
_CLASS
 
Constructor Summary
ERXBetweenQualifier(java.lang.String aKey, java.lang.Object aMinimumValue, java.lang.Object aMaximumValue)
          Creates a qualifier for a given key with a min and max value specified.
 
Method Summary
 void addQualifierKeysToSet(com.webobjects.foundation.NSMutableSet aSet)
          Adds the qualification key of the qualifier to the given set.
 java.lang.Object clone()
          Implementation of the Clonable interface.
protected  com.webobjects.foundation.NSComparator comparatorForObject(java.lang.Object anObject)
          Determines the comparator to use for a given object based on the object's class.
 boolean evaluateWithObject(java.lang.Object anObject)
          Compares an object to determine if it is within the between qualification of the current qualifier.
 java.lang.String key()
          Gets the key to qualify against.
 java.lang.Object maximumValue()
          Gets the maximum value.
 java.lang.Object minimumValue()
          Gets the minimum value.
 com.webobjects.eocontrol.EOQualifier qualifierWithBindings(com.webobjects.foundation.NSDictionary someBindings, boolean requiresAll)
          Creates another qualifier after replacing the values of the bindings.
 void setKey(java.lang.String aValue)
          Sets the qualification key.
 void setMaximumValue(java.lang.Object aValue)
          Sets the maximum value.
 void setMinimumValue(java.lang.Object aValue)
          Sets the minimum value.
 java.lang.String toString()
           
 void validateKeysWithRootClassDescription(com.webobjects.eocontrol.EOClassDescription aClassDescription)
          This qualifier does not perform validation.
 
Methods inherited from class er.extensions.qualifiers.ERXKeyValueQualifier
and, filter, filtered, first, not, one, or, requiredOne
 
Methods inherited from class com.webobjects.eocontrol.EOKeyValueQualifier
_accept, classForCoder, decodeObject, decodeWithKeyValueUnarchiver, encodeWithCoder, encodeWithKeyValueArchiver, equals, selector, value
 
Methods inherited from class com.webobjects.eocontrol.EOQualifier
_isEmpty, allQualifierKeys, allQualifierOperators, bindingKeys, filterArrayWithQualifier, filteredArrayWithQualifier, keyPathForBindingKey, operatorSelectorForSelectorNamed, operatorSelectorForString, qualifierToMatchAllValues, qualifierToMatchAnyValue, qualifierWithQualifierFormat, relationalQualifierOperators, stringForOperatorSelector
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ERXBetweenQualifier

public ERXBetweenQualifier(java.lang.String aKey,
                           java.lang.Object aMinimumValue,
                           java.lang.Object aMaximumValue)
Creates a qualifier for a given key with a min and max value specified.

Parameters:
aKey - key to qualify against
aMinimumValue - minimum value of the key
aMaximumValue - maximum value of the key
Method Detail

key

public java.lang.String key()
Gets the key to qualify against.

Overrides:
key in class com.webobjects.eocontrol.EOKeyValueQualifier
Returns:
qualifier key

setKey

public void setKey(java.lang.String aValue)
Sets the qualification key.

Parameters:
aValue - for the qualification key.

minimumValue

public java.lang.Object minimumValue()
Gets the minimum value.

Returns:
minimum value.

setMinimumValue

public void setMinimumValue(java.lang.Object aValue)
Sets the minimum value.

Parameters:
aValue - new minimum value

maximumValue

public java.lang.Object maximumValue()
Gets the maximum value.

Returns:
maximum value.

setMaximumValue

public void setMaximumValue(java.lang.Object aValue)
Sets the maximum value.

Parameters:
aValue - new maximum value

addQualifierKeysToSet

public void addQualifierKeysToSet(com.webobjects.foundation.NSMutableSet aSet)
Adds the qualification key of the qualifier to the given set.

Overrides:
addQualifierKeysToSet in class com.webobjects.eocontrol.EOKeyValueQualifier
Parameters:
aSet - to add the qualification key to.

qualifierWithBindings

public com.webobjects.eocontrol.EOQualifier qualifierWithBindings(com.webobjects.foundation.NSDictionary someBindings,
                                                                  boolean requiresAll)
Creates another qualifier after replacing the values of the bindings. Since this qualifier does not support qualifier binding keys a clone of the qualifier is returned.

Overrides:
qualifierWithBindings in class com.webobjects.eocontrol.EOKeyValueQualifier
Parameters:
someBindings - some bindings
requiresAll - tells if the qualifier requires all bindings
Returns:
clone of the current qualifier.

validateKeysWithRootClassDescription

public void validateKeysWithRootClassDescription(com.webobjects.eocontrol.EOClassDescription aClassDescription)
This qualifier does not perform validation. This is a no-op method.

Overrides:
validateKeysWithRootClassDescription in class com.webobjects.eocontrol.EOKeyValueQualifier
Parameters:
aClassDescription - to validation the qualifier keys against.

comparatorForObject

protected com.webobjects.foundation.NSComparator comparatorForObject(java.lang.Object anObject)
Determines the comparator to use for a given object based on the object's class.

Parameters:
anObject - to find the comparator for
Returns:
comparator to use when comparing objects of a given class.

evaluateWithObject

public boolean evaluateWithObject(java.lang.Object anObject)
Compares an object to determine if it is within the between qualification of the current qualifier. This method is only used for in-memory qualification.

Specified by:
evaluateWithObject in interface com.webobjects.eocontrol.EOQualifierEvaluation
Overrides:
evaluateWithObject in class com.webobjects.eocontrol.EOKeyValueQualifier
Returns:
if the given object is within the boundries of the qualifier.

clone

public java.lang.Object clone()
Implementation of the Clonable interface.

Overrides:
clone in class com.webobjects.eocontrol.EOQualifier
Returns:
clone of the qualifier

toString

public java.lang.String toString()
Overrides:
toString in class com.webobjects.eocontrol.EOKeyValueQualifier

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.