er.extensions
Class ERXInQualifier
java.lang.Object
com.webobjects.eocontrol.EOQualifier
com.webobjects.eocontrol.EOKeyValueQualifier
er.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 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 |
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. |
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 |
ERXInQualifier
public ERXInQualifier(String key,
NSArray values)
- Constructs an in qualifer for a given
attribute name and an array of values.
- Parameters:
key
- attribute namevalues
- 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 namevalues
- array of valuespadToSize
- 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
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()
Copyright © 2002 – 2004 Project Wonder.