public class ERXInQualifier extends ERXKeyValueQualifier implements Cloneable
ERXInQualifier q = new ERXInQualifier("userId", arrayOfNumbers);
Then this qualifier would generate SQL of the form:
USER_ID IN (<array of numbers or data>)Modifier and Type | Class and Description |
---|---|
static class |
ERXInQualifier.InQualifierSQLGenerationSupport
Adds SQL generation support.
|
EOQualifier.Comparison, EOQualifier.ComparisonSupport, EOQualifier.QualifierVariableSubstitutionException
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
EOKeyValueArchiving._NullValueSupport, EOKeyValueArchiving._NumberSupport, EOKeyValueArchiving._TimestampSupport, EOKeyValueArchiving.Awaking, EOKeyValueArchiving.FinishInitialization, EOKeyValueArchiving.Support
_CLASS, _key, _lowercaseCache, _selector, _value
QualifierOperatorCaseInsensitiveLike, QualifierOperatorContains, QualifierOperatorEqual, QualifierOperatorGreaterThan, QualifierOperatorGreaterThanOrEqualTo, QualifierOperatorLessThan, QualifierOperatorLessThanOrEqualTo, QualifierOperatorLike, QualifierOperatorNotEqual
Constructor and Description |
---|
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 qualifier for a given
attribute name and an array of values.
|
Modifier and Type | Method and Description |
---|---|
Class |
classForCoder() |
Object |
clone()
EOF seems to be wanting to clone qualifiers when
they are inside an and-or qualifier without this
method, ERXInQualifier is cloned into
an EOKeyValueQualifier and the generated SQL is incorrect...
|
static Object |
decodeObject(NSCoder coder) |
static Object |
decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver) |
void |
encodeWithCoder(NSCoder coder) |
void |
encodeWithKeyValueArchiver(EOKeyValueArchiver archiver) |
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() |
and, filter, filtered, first, not, one, or, requiredOne
_accept, addQualifierKeysToSet, equals, key, qualifierWithBindings, selector, validateKeysWithRootClassDescription, value
_isEmpty, allQualifierKeys, allQualifierOperators, bindingKeys, filterArrayWithQualifier, filteredArrayWithQualifier, keyPathForBindingKey, operatorSelectorForSelectorNamed, operatorSelectorForString, qualifierToMatchAllValues, qualifierToMatchAnyValue, qualifierWithQualifierFormat, relationalQualifierOperators, stringForOperatorSelector
public ERXInQualifier(String key, NSArray values)
key
- attribute namevalues
- array of valuespublic ERXInQualifier(String key, NSArray values, int padToSize)
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 ....16public String toString()
toString
in class EOKeyValueQualifier
public NSArray values()
public boolean evaluateWithObject(Object object)
evaluateWithObject
in interface EOQualifierEvaluation
evaluateWithObject
in class ERXKeyValueQualifier
public Object clone()
clone
in class EOQualifier
public Class classForCoder()
classForCoder
in interface NSCoding
classForCoder
in class EOKeyValueQualifier
public void encodeWithCoder(NSCoder coder)
encodeWithCoder
in interface NSCoding
encodeWithCoder
in class EOKeyValueQualifier
public void encodeWithKeyValueArchiver(EOKeyValueArchiver archiver)
encodeWithKeyValueArchiver
in interface EOKeyValueArchiving
encodeWithKeyValueArchiver
in class EOKeyValueQualifier
public static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver)
Copyright © 2002 – 2024 Project Wonder.