public class ERXQualifierInSubquery extends EOQualifier implements EOQualifierSQLGeneration, Cloneable, EOQualifierEvaluation
EOQualifier q = EOQualifier.qualifierWithQualifierFormat("firstName = 'Max'", null);
ERXQualifierInSubquery qq = new ERXQualifierInSubquery(q, "User", "group");
EOFetchSpecification fs = new EOFetchSpecification("Group", qq, null);
Would generate: "SELECT t0.GROUP_ID, t0.NAME FROM USER t0 WHERE t0.GROUP_ID
IN ( SELECT t0.GROUP_ID FROM GROUP t0 WHERE t0.NAME = ? ) "
This class can be used to work around the EOF bug where OR queries involving
many-to-manies are incorrectly generated
It will also generate
... t0.FOREIGN_KEY_ID in (select t1.ID from X where [your qualifier here])
with the 3 arg constructorEOQualifier.Comparison, EOQualifier.ComparisonSupport, EOQualifier.QualifierVariableSubstitutionException
EOQualifierSQLGeneration._AndQualifierSupport, EOQualifierSQLGeneration._KeyComparisonQualifierSupport, EOQualifierSQLGeneration._KeyValueQualifierSupport, EOQualifierSQLGeneration._NotQualifierSupport, EOQualifierSQLGeneration._OrQualifierSupport, EOQualifierSQLGeneration.Support
Modifier and Type | Field and Description |
---|---|
protected String |
attributeName
holds the attribute name
|
protected String |
destinationAttName
holds the attribute name
|
protected String |
entityName
holds the entity name
|
protected EOQualifier |
qualifier
holds the subqualifier
|
protected String |
relationshipName
holds the relationship name
|
_CLASS, QualifierOperatorCaseInsensitiveLike, QualifierOperatorContains, QualifierOperatorEqual, QualifierOperatorGreaterThan, QualifierOperatorGreaterThanOrEqualTo, QualifierOperatorLessThan, QualifierOperatorLessThanOrEqualTo, QualifierOperatorLike, QualifierOperatorNotEqual
_CLASS
Constructor and Description |
---|
ERXQualifierInSubquery(EOQualifier qualifier)
Public single argument constructor.
|
ERXQualifierInSubquery(EOQualifier qualifier,
String entityName,
String relationshipName) |
ERXQualifierInSubquery(EOQualifier qualifier,
String entityName,
String attributeName,
String destinationAttName) |
Modifier and Type | Method and Description |
---|---|
void |
addQualifierKeysToSet(NSMutableSet aSet)
Only used with qualifier keys which are not supported in this qualifier
at this time.
|
Object |
clone()
Implementation of the Clonable interface.
|
boolean |
evaluateWithObject(Object object) |
EOQualifier |
qualifierMigratedFromEntityRelationshipPath(EOEntity anEntity,
String aPath)
Implementation of the EOQualifierSQLGeneration interface.
|
EOQualifier |
qualifierWithBindings(NSDictionary someBindings,
boolean requiresAll)
Creates another qualifier after replacing the values of the bindings.
|
EOQualifier |
schemaBasedQualifierWithRootEntity(EOEntity anEntity)
Implementation of the EOQualifierSQLGeneration interface.
|
String |
sqlStringForSQLExpression(EOSQLExpression e)
Generates the sql string for the given sql expression.
|
String |
toString()
Description of the qualifier
|
void |
validateKeysWithRootClassDescription(EOClassDescription aClassDescription)
This qualifier does not perform validation.
|
_accept, _isEmpty, allQualifierKeys, allQualifierOperators, bindingKeys, filterArrayWithQualifier, filteredArrayWithQualifier, keyPathForBindingKey, operatorSelectorForSelectorNamed, operatorSelectorForString, qualifierToMatchAllValues, qualifierToMatchAnyValue, qualifierWithQualifierFormat, relationalQualifierOperators, stringForOperatorSelector
protected EOQualifier qualifier
protected String entityName
protected String relationshipName
protected String attributeName
protected String destinationAttName
public ERXQualifierInSubquery(EOQualifier qualifier)
qualifier
- sub qualifierpublic ERXQualifierInSubquery(EOQualifier qualifier, String entityName, String relationshipName)
qualifier
- sub qualifierentityName
- of the sub qualificationrelationshipName
- relationship namepublic ERXQualifierInSubquery(EOQualifier qualifier, String entityName, String attributeName, String destinationAttName)
qualifier
- sub qualifierentityName
- of the sub qualificationattributeName
- foreign key attribute namedestinationAttName
- destination key namepublic void addQualifierKeysToSet(NSMutableSet aSet)
addQualifierKeysToSet
in class EOQualifier
aSet
- of qualifier keyspublic EOQualifier qualifierWithBindings(NSDictionary someBindings, boolean requiresAll)
qualifierWithBindings
in class EOQualifier
someBindings
- some bindingsrequiresAll
- tells if the qualifier requires all bindingspublic void validateKeysWithRootClassDescription(EOClassDescription aClassDescription)
validateKeysWithRootClassDescription
in class EOQualifier
aClassDescription
- to validation the qualifier keys against.public String sqlStringForSQLExpression(EOSQLExpression e)
sqlStringForSQLExpression
in interface EOQualifierSQLGeneration
e
- a given sql expressionpublic EOQualifier schemaBasedQualifierWithRootEntity(EOEntity anEntity)
schemaBasedQualifierWithRootEntity
in interface EOQualifierSQLGeneration
anEntity
- an entity.public EOQualifier qualifierMigratedFromEntityRelationshipPath(EOEntity anEntity, String aPath)
qualifierMigratedFromEntityRelationshipPath
in interface EOQualifierSQLGeneration
anEntity
- an entityaPath
- relationship pathpublic String toString()
public Object clone()
clone
in class EOQualifier
public boolean evaluateWithObject(Object object)
evaluateWithObject
in interface EOQualifierEvaluation
evaluateWithObject
in class EOQualifier
Copyright © 2002 – 2024 Project Wonder.