ERXBetweenQualifier Class Reference

Inherits er::extensions::qualifiers::ERXKeyValueQualifier, and com::webobjects::eocontrol::EOQualifierEvaluation.

Collaboration diagram for ERXBetweenQualifier:

Collaboration graph
[legend]

List of all members.

Classes

class  BetweenQualifierSQLGenerationSupport

Public Member Functions

void addQualifierKeysToSet (NSMutableSet aSet)
Object clone ()
 ERXBetweenQualifier (String aKey, Object aMinimumValue, Object aMaximumValue)
boolean evaluateWithObject (Object anObject)
String key ()
Object maximumValue ()
Object minimumValue ()
EOQualifier qualifierWithBindings (NSDictionary someBindings, boolean requiresAll)
void setKey (String aValue)
void setMaximumValue (Object aValue)
void setMinimumValue (Object aValue)
String toString ()
void validateKeysWithRootClassDescription (EOClassDescription aClassDescription)

Protected Member Functions

NSComparator comparatorForObject (Object anObject)

Static Package Functions

 [static initializer]

Private Member Functions

String valueStringForValue (Object aValue)

Private Attributes

String _key = null
Object _maximumValue = null
Object _minimumValue = null

Static Private Attributes

static final String BetweenStatement = " BETWEEN "
static final String Separator = " AND "


Detailed Description

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.


Constructor & Destructor Documentation

ERXBetweenQualifier ( String  aKey,
Object  aMinimumValue,
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


Member Function Documentation

[static initializer] (  )  [static, package]

register SQL generation support for the qualifier

void addQualifierKeysToSet ( NSMutableSet  aSet  ) 

Adds the qualification key of the qualifier to the given set.

Parameters:
aSet to add the qualification key to.

Object clone (  ) 

Implementation of the Clonable interface.

Returns:
clone of the qualifier

NSComparator comparatorForObject ( Object  anObject  )  [protected]

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.

boolean evaluateWithObject ( 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.

Returns:
if the given object is within the boundries of the qualifier.

String key (  ) 

Gets the key to qualify against.

Returns:
qualifier key

Object maximumValue (  ) 

Gets the maximum value.

Returns:
maximum value.

Object minimumValue (  ) 

Gets the minimum value.

Returns:
minimum value.

EOQualifier qualifierWithBindings ( 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.

Parameters:
someBindings some bindings
requiresAll tells if the qualifier requires all bindings
Returns:
clone of the current qualifier.

void setKey ( String  aValue  ) 

Sets the qualification key.

Parameters:
aValue for the qualification key.

void setMaximumValue ( Object  aValue  ) 

Sets the maximum value.

Parameters:
aValue new maximum value

void setMinimumValue ( Object  aValue  ) 

Sets the minimum value.

Parameters:
aValue new minimum value

String toString (  ) 

void validateKeysWithRootClassDescription ( EOClassDescription  aClassDescription  ) 

This qualifier does not perform validation. This is a no-op method.

Parameters:
aClassDescription to validation the qualifier keys against.

String valueStringForValue ( Object  aValue  )  [private]


Member Data Documentation

String _key = null [private]

holds the key used to compare against

Object _maximumValue = null [private]

holds the maximum value

Object _minimumValue = null [private]

holds the minimun value

final String BetweenStatement = " BETWEEN " [static, private]

holds the between sql string

final String Separator = " AND " [static, private]

holds the and sql string


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:11 2012 for Project Wonder by  doxygen 1.5.8