Project Wonder 2.0

er.extensions
Class ERXInQualifier

java.lang.Object
  extended bycom.webobjects.eocontrol.EOQualifier
      extended bycom.webobjects.eocontrol.EOKeyValueQualifier
          extended byer.extensions.ERXInQualifier
All Implemented Interfaces:
Cloneable, EOKeyValueArchiving, EOQualifierEvaluation, NSCoding, Serializable
Direct Known Subclasses:
ERXPrimaryKeyListQualifier

public class ERXInQualifier
extends EOKeyValueQualifier
implements Cloneable

The ERXInQualifier is useful for creating qualifiers that will generate SQL using the 'IN' key word.

For example constructing this qualifer:
ERXInQualifier q = new ERXInQualifier("userId", arrayOfNumbers); Then this qualifier would generate SQL of the form: USER_ID IN ()

See Also:
Serialized Form

Nested Class Summary
static class ERXInQualifier.InQualifierSQLGenerationSupport
          Adds SQL generation support.
 
Nested classes inherited from class com.webobjects.eocontrol.EOQualifier
EOQualifier.Comparison, EOQualifier.ComparisonSupport, EOQualifier.QualifierVariableSubstitutionException
 
Nested classes inherited from class com.webobjects.foundation.NSCoding
NSCoding._BigDecimalSupport, NSCoding._BigIntegerSupport, NSCoding._BooleanSupport, NSCoding._ByteSupport, NSCoding._CharacterSupport, NSCoding._DateSupport, NSCoding._DoubleSupport, NSCoding._FloatSupport, NSCoding._IntegerSupport, NSCoding._LongSupport, NSCoding._NumberSupport, NSCoding._ShortSupport, NSCoding._StringSupport, NSCoding.Support
 
Nested classes inherited from class com.webobjects.eocontrol.EOKeyValueArchiving
EOKeyValueArchiving._NullValueSupport, EOKeyValueArchiving._NumberSupport, EOKeyValueArchiving._TimestampSupport, EOKeyValueArchiving.Awaking, EOKeyValueArchiving.FinishInitialization, EOKeyValueArchiving.Support
 
Field Summary
 
Fields inherited from class com.webobjects.eocontrol.EOKeyValueQualifier
_CLASS, _key, _lowercaseCache, _selector, _value
 
Fields inherited from class com.webobjects.eocontrol.EOQualifier
QualifierOperatorCaseInsensitiveLike, QualifierOperatorContains, QualifierOperatorEqual, QualifierOperatorGreaterThan, QualifierOperatorGreaterThanOrEqualTo, QualifierOperatorLessThan, QualifierOperatorLessThanOrEqualTo, QualifierOperatorLike, QualifierOperatorNotEqual
 
Constructor Summary
ERXInQualifier(String key, NSArray values)
          Constructs an in qualifer for a given attribute name and an array of values.
ERXInQualifier(String key, NSArray values, int padToSize)
          Constructs an in qualifer for a given attribute name and an array of values.
 
Method Summary
 Object clone()
           
 boolean evaluateWithObject(Object object)
          Tests if the given object's key is in the supplied values
 String toString()
          String representation of the in qualifier.
 NSArray values()
           
 
Methods inherited from class com.webobjects.eocontrol.EOKeyValueQualifier
_accept, addQualifierKeysToSet, classForCoder, decodeObject, decodeWithKeyValueUnarchiver, encodeWithCoder, encodeWithKeyValueArchiver, equals, key, qualifierWithBindings, selector, validateKeysWithRootClassDescription, 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

ERXInQualifier

public ERXInQualifier(String key,
                      NSArray values)
Constructs an in qualifer for a given attribute name and an array of values.

Parameters:
key - attribute name
values - array of values

ERXInQualifier

public ERXInQualifier(String key,
                      NSArray values,
                      int padToSize)
Constructs an in qualifer for a given attribute name and an array of values.

Parameters:
key - attribute name
values - array of values
padToSize - the size which is expected to be reasonable for this qualifier. If the NSArray values has more than one element, the padToSize is used to round up the number of elements and pad with nulls. Doing this reduces the number of unique queries which result from having an arbitrary number of values. For example, if the padToSize is 8, then we'll either have 1, or 8, or 16, or... bind variables as compared to 1..., 2..., 3..., 4..., or ....16
Method Detail

toString

public String toString()
String representation of the in qualifier.

Returns:
string description of the qualifier

values

public NSArray values()

evaluateWithObject

public boolean evaluateWithObject(Object object)
Tests if the given object's key is in the supplied values

Specified by:
evaluateWithObject in interface EOQualifierEvaluation

clone

public Object clone()

Last updated: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.