public class ERXToManyQualifier extends ERXKeyValueQualifier implements java.lang.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.QualifierVariableSubstitutionExceptionNSCoding._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.SupportEOKeyValueArchiving._NullValueSupport, EOKeyValueArchiving._NumberSupport, EOKeyValueArchiving._TimestampSupport, EOKeyValueArchiving.Awaking, EOKeyValueArchiving.FinishInitialization, EOKeyValueArchiving.Support| Modifier and Type | Field and Description |
|---|---|
static org.apache.log4j.Logger |
log
logging support
|
static java.lang.String |
MatchesAllInArraySelectorName |
_CLASS, _key, _lowercaseCache, _selector, _valueQualifierOperatorCaseInsensitiveLike, QualifierOperatorContains, QualifierOperatorEqual, QualifierOperatorGreaterThan, QualifierOperatorGreaterThanOrEqualTo, QualifierOperatorLessThan, QualifierOperatorLessThanOrEqualTo, QualifierOperatorLike, QualifierOperatorNotEqual| Constructor and Description |
|---|
ERXToManyQualifier(java.lang.String toManyKey,
NSArray elements) |
ERXToManyQualifier(java.lang.String toManyKey,
NSArray elements,
int minCount) |
| Modifier and Type | Method and Description |
|---|---|
void |
addQualifierKeysToSet(NSMutableSet arg0) |
java.lang.Object |
clone()
Implementation of the Cloneable interface.
|
NSArray |
elements() |
boolean |
evaluateWithObject(java.lang.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.
|
java.lang.String |
key() |
int |
minCount() |
EOQualifier |
qualifierWithBindings(NSDictionary arg0,
boolean arg1) |
java.lang.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, stringForOperatorSelectorpublic static final java.lang.String MatchesAllInArraySelectorName
public static final org.apache.log4j.Logger log
public ERXToManyQualifier(java.lang.String toManyKey,
NSArray elements)
public ERXToManyQualifier(java.lang.String toManyKey,
NSArray elements,
int minCount)
public NSArray elements()
public java.lang.String key()
key in class EOKeyValueQualifierpublic int minCount()
public java.lang.String toString()
toString in class EOKeyValueQualifierpublic java.lang.Object clone()
clone in class EOQualifierpublic EOQualifier qualifierWithBindings(NSDictionary arg0, boolean arg1)
qualifierWithBindings in class EOKeyValueQualifierpublic void validateKeysWithRootClassDescription(EOClassDescription arg0)
validateKeysWithRootClassDescription in class EOKeyValueQualifierpublic void addQualifierKeysToSet(NSMutableSet arg0)
addQualifierKeysToSet in class EOKeyValueQualifierpublic boolean evaluateWithObject(java.lang.Object object)
ERXKeyValueQualifierer.extensions.ERXKeyValueQualifier.Contains.flatten to falseevaluateWithObject in interface EOQualifierEvaluationevaluateWithObject in class ERXKeyValueQualifierCopyright © 2002 – 2022 Project Wonder.