public class ERXToManyQualifier extends ERXKeyValueQualifier implements Cloneable
NSArray employees; // given, can be null
// Find all of the departments that have all of those employees
ERXToManyQualifier q = new ERXToManyQualifier("toEmployees", employees);
EOFetchSpecification fs = new EOFetchSpecification("Department", q, null);
NSArray departments = ec.objectsWithFetchSpecification(fs);
If you want to find say departments that have 5 or more of the given
employees (imagine you have a list of 10 or so), then you could
construct the qualifier like: ERXToManyQualifier q = new ERXToManyQualifier("toEmployees", employees, 5);
ERXToManyQualifier q = new ERXToManyQualifier("toEmployees", employees, 1);
Modifier and Type | Class and Description |
---|---|
static class |
ERXToManyQualifier.ToManyQualifierSQLGenerationSupport
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
Modifier and Type | Field and Description |
---|---|
static String |
MatchesAllInArraySelectorName |
_CLASS, _key, _lowercaseCache, _selector, _value
QualifierOperatorCaseInsensitiveLike, QualifierOperatorContains, QualifierOperatorEqual, QualifierOperatorGreaterThan, QualifierOperatorGreaterThanOrEqualTo, QualifierOperatorLessThan, QualifierOperatorLessThanOrEqualTo, QualifierOperatorLike, QualifierOperatorNotEqual
Constructor and Description |
---|
ERXToManyQualifier(String toManyKey,
NSArray elements) |
ERXToManyQualifier(String toManyKey,
NSArray elements,
int minCount) |
Modifier and Type | Method and Description |
---|---|
void |
addQualifierKeysToSet(NSMutableSet arg0) |
Object |
clone()
Implementation of the Cloneable interface.
|
NSArray |
elements() |
boolean |
evaluateWithObject(Object object)
Overridden to handle case of in-memory evaluation of QualifierOperatorContains selector and a keyPath that has multiple toMany and/or manyToMany-flattened relationships resulting in arrays of arrays rather than
an array of discrete objects.
|
String |
key() |
int |
minCount() |
EOQualifier |
qualifierWithBindings(NSDictionary arg0,
boolean arg1) |
String |
toString()
Description of the qualifier.
|
void |
validateKeysWithRootClassDescription(EOClassDescription arg0) |
and, filter, filtered, first, not, one, or, requiredOne
_accept, classForCoder, decodeObject, decodeWithKeyValueUnarchiver, encodeWithCoder, encodeWithKeyValueArchiver, equals, selector, value
_isEmpty, allQualifierKeys, allQualifierOperators, bindingKeys, filterArrayWithQualifier, filteredArrayWithQualifier, keyPathForBindingKey, operatorSelectorForSelectorNamed, operatorSelectorForString, qualifierToMatchAllValues, qualifierToMatchAnyValue, qualifierWithQualifierFormat, relationalQualifierOperators, stringForOperatorSelector
public static final String MatchesAllInArraySelectorName
public NSArray elements()
public String key()
key
in class EOKeyValueQualifier
public int minCount()
public String toString()
toString
in class EOKeyValueQualifier
public Object clone()
clone
in class EOQualifier
public EOQualifier qualifierWithBindings(NSDictionary arg0, boolean arg1)
qualifierWithBindings
in class EOKeyValueQualifier
public void validateKeysWithRootClassDescription(EOClassDescription arg0)
validateKeysWithRootClassDescription
in class EOKeyValueQualifier
public void addQualifierKeysToSet(NSMutableSet arg0)
addQualifierKeysToSet
in class EOKeyValueQualifier
public boolean evaluateWithObject(Object object)
ERXKeyValueQualifier
er.extensions.ERXKeyValueQualifier.Contains.flatten
to false
evaluateWithObject
in interface EOQualifierEvaluation
evaluateWithObject
in class ERXKeyValueQualifier
Copyright © 2002 – 2024 Project Wonder.