er.extensions.eof.qualifiers
Class ERXInQualifier
java.lang.Object
com.webobjects.eocontrol.EOQualifier
com.webobjects.eocontrol.EOKeyValueQualifier
er.extensions.qualifiers.ERXKeyValueQualifier
er.extensions.eof.qualifiers.ERXInQualifier
- All Implemented Interfaces:
- com.webobjects.eocontrol.EOKeyValueArchiving, com.webobjects.eocontrol.EOQualifierEvaluation, com.webobjects.foundation.NSCoding, IERXChainableQualifier, java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- ERXPrimaryKeyListQualifier
public class ERXInQualifier
- extends ERXKeyValueQualifier
- implements java.lang.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 (<array of numbers or data>)
- See Also:
- Serialized Form
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 |
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(java.lang.String key,
com.webobjects.foundation.NSArray values)
Constructs an in qualifer for a given
attribute name and an array of values. |
ERXInQualifier(java.lang.String key,
com.webobjects.foundation.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, 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 |
ERXInQualifier
public ERXInQualifier(java.lang.String key,
com.webobjects.foundation.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(java.lang.String key,
com.webobjects.foundation.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 java.lang.String toString()
- String representation of the in
qualifier.
- Overrides:
toString
in class com.webobjects.eocontrol.EOKeyValueQualifier
- Returns:
- string description of the qualifier
values
public com.webobjects.foundation.NSArray values()
evaluateWithObject
public boolean evaluateWithObject(java.lang.Object object)
- Tests if the given object's key is in the supplied values
- Specified by:
evaluateWithObject
in interface com.webobjects.eocontrol.EOQualifierEvaluation
- Overrides:
evaluateWithObject
in class com.webobjects.eocontrol.EOKeyValueQualifier
clone
public java.lang.Object clone()
- Overrides:
clone
in class com.webobjects.eocontrol.EOQualifier
classForCoder
public java.lang.Class classForCoder()
- Specified by:
classForCoder
in interface com.webobjects.foundation.NSCoding
- Overrides:
classForCoder
in class com.webobjects.eocontrol.EOKeyValueQualifier
decodeObject
public static java.lang.Object decodeObject(com.webobjects.foundation.NSCoder coder)
encodeWithCoder
public void encodeWithCoder(com.webobjects.foundation.NSCoder coder)
- Specified by:
encodeWithCoder
in interface com.webobjects.foundation.NSCoding
- Overrides:
encodeWithCoder
in class com.webobjects.eocontrol.EOKeyValueQualifier
encodeWithKeyValueArchiver
public void encodeWithKeyValueArchiver(com.webobjects.eocontrol.EOKeyValueArchiver archiver)
- Specified by:
encodeWithKeyValueArchiver
in interface com.webobjects.eocontrol.EOKeyValueArchiving
- Overrides:
encodeWithKeyValueArchiver
in class com.webobjects.eocontrol.EOKeyValueQualifier
decodeWithKeyValueUnarchiver
public static java.lang.Object decodeWithKeyValueUnarchiver(com.webobjects.eocontrol.EOKeyValueUnarchiver unarchiver)
Copyright © 2002 – 2007 Project Wonder.