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.
|
com.webobjects.eocontrol.EOQualifier.Comparison, com.webobjects.eocontrol.EOQualifier.ComparisonSupport, com.webobjects.eocontrol.EOQualifier.QualifierVariableSubstitutionException
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
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
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() |
com.webobjects.eocontrol.EOQualifier |
qualifierWithBindings(NSDictionary arg0,
boolean arg1) |
String |
toString()
Description of the qualifier.
|
void |
validateKeysWithRootClassDescription(com.webobjects.eocontrol.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 com.webobjects.eocontrol.EOKeyValueQualifier
public int minCount()
public String toString()
toString
in class com.webobjects.eocontrol.EOKeyValueQualifier
public Object clone()
clone
in class com.webobjects.eocontrol.EOQualifier
public com.webobjects.eocontrol.EOQualifier qualifierWithBindings(NSDictionary arg0, boolean arg1)
qualifierWithBindings
in class com.webobjects.eocontrol.EOKeyValueQualifier
public void validateKeysWithRootClassDescription(com.webobjects.eocontrol.EOClassDescription arg0)
validateKeysWithRootClassDescription
in class com.webobjects.eocontrol.EOKeyValueQualifier
public void addQualifierKeysToSet(NSMutableSet arg0)
addQualifierKeysToSet
in class com.webobjects.eocontrol.EOKeyValueQualifier
public boolean evaluateWithObject(Object object)
ERXKeyValueQualifier
er.extensions.ERXKeyValueQualifier.Contains.flatten
to false
evaluateWithObject
in interface com.webobjects.eocontrol.EOQualifierEvaluation
evaluateWithObject
in class ERXKeyValueQualifier
Copyright © 2002 – 2020 Project Wonder.