public class ERXQualifierInSubquery extends com.webobjects.eocontrol.EOQualifier implements com.webobjects.eoaccess.EOQualifierSQLGeneration, Cloneable, com.webobjects.eocontrol.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 constructorcom.webobjects.eocontrol.EOQualifier.Comparison, com.webobjects.eocontrol.EOQualifier.ComparisonSupport, com.webobjects.eocontrol.EOQualifier.QualifierVariableSubstitutionException
com.webobjects.eoaccess.EOQualifierSQLGeneration._AndQualifierSupport, com.webobjects.eoaccess.EOQualifierSQLGeneration._KeyComparisonQualifierSupport, com.webobjects.eoaccess.EOQualifierSQLGeneration._KeyValueQualifierSupport, com.webobjects.eoaccess.EOQualifierSQLGeneration._NotQualifierSupport, com.webobjects.eoaccess.EOQualifierSQLGeneration._OrQualifierSupport, com.webobjects.eoaccess.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 com.webobjects.eocontrol.EOQualifier |
qualifier
holds the subqualifier
|
protected String |
relationshipName
holds the relationship name
|
_CLASS, QualifierOperatorCaseInsensitiveLike, QualifierOperatorContains, QualifierOperatorEqual, QualifierOperatorGreaterThan, QualifierOperatorGreaterThanOrEqualTo, QualifierOperatorLessThan, QualifierOperatorLessThanOrEqualTo, QualifierOperatorLike, QualifierOperatorNotEqual
Constructor and Description |
---|
ERXQualifierInSubquery(com.webobjects.eocontrol.EOQualifier qualifier)
Public single argument constructor.
|
ERXQualifierInSubquery(com.webobjects.eocontrol.EOQualifier qualifier,
String entityName,
String relationshipName) |
ERXQualifierInSubquery(com.webobjects.eocontrol.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) |
com.webobjects.eocontrol.EOQualifier |
qualifierMigratedFromEntityRelationshipPath(com.webobjects.eoaccess.EOEntity anEntity,
String aPath)
Implementation of the EOQualifierSQLGeneration interface.
|
com.webobjects.eocontrol.EOQualifier |
qualifierWithBindings(NSDictionary someBindings,
boolean requiresAll)
Creates another qualifier after replacing the values of the bindings.
|
com.webobjects.eocontrol.EOQualifier |
schemaBasedQualifierWithRootEntity(com.webobjects.eoaccess.EOEntity anEntity)
Implementation of the EOQualifierSQLGeneration interface.
|
String |
sqlStringForSQLExpression(com.webobjects.eoaccess.EOSQLExpression e)
Generates the sql string for the given sql expression.
|
String |
toString()
Description of the qualifier
|
void |
validateKeysWithRootClassDescription(com.webobjects.eocontrol.EOClassDescription aClassDescription)
This qualifier does not perform validation.
|
_accept, _isEmpty, allQualifierKeys, allQualifierOperators, bindingKeys, filterArrayWithQualifier, filteredArrayWithQualifier, keyPathForBindingKey, operatorSelectorForSelectorNamed, operatorSelectorForString, qualifierToMatchAllValues, qualifierToMatchAnyValue, qualifierWithQualifierFormat, relationalQualifierOperators, stringForOperatorSelector
protected com.webobjects.eocontrol.EOQualifier qualifier
protected String entityName
protected String relationshipName
protected String attributeName
protected String destinationAttName
public ERXQualifierInSubquery(com.webobjects.eocontrol.EOQualifier qualifier)
qualifier
- sub qualifierpublic ERXQualifierInSubquery(com.webobjects.eocontrol.EOQualifier qualifier, String entityName, String relationshipName)
qualifier
- sub qualifierentityName
- of the sub qualificationrelationshipName
- relationship namepublic ERXQualifierInSubquery(com.webobjects.eocontrol.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 com.webobjects.eocontrol.EOQualifier
aSet
- of qualifier keyspublic com.webobjects.eocontrol.EOQualifier qualifierWithBindings(NSDictionary someBindings, boolean requiresAll)
qualifierWithBindings
in class com.webobjects.eocontrol.EOQualifier
someBindings
- some bindingsrequiresAll
- tells if the qualifier requires all bindingspublic void validateKeysWithRootClassDescription(com.webobjects.eocontrol.EOClassDescription aClassDescription)
validateKeysWithRootClassDescription
in class com.webobjects.eocontrol.EOQualifier
aClassDescription
- to validation the qualifier keys against.public String sqlStringForSQLExpression(com.webobjects.eoaccess.EOSQLExpression e)
sqlStringForSQLExpression
in interface com.webobjects.eoaccess.EOQualifierSQLGeneration
e
- a given sql expressionpublic com.webobjects.eocontrol.EOQualifier schemaBasedQualifierWithRootEntity(com.webobjects.eoaccess.EOEntity anEntity)
schemaBasedQualifierWithRootEntity
in interface com.webobjects.eoaccess.EOQualifierSQLGeneration
anEntity
- an entity.public com.webobjects.eocontrol.EOQualifier qualifierMigratedFromEntityRelationshipPath(com.webobjects.eoaccess.EOEntity anEntity, String aPath)
qualifierMigratedFromEntityRelationshipPath
in interface com.webobjects.eoaccess.EOQualifierSQLGeneration
anEntity
- an entityaPath
- relationship pathpublic String toString()
public Object clone()
clone
in class com.webobjects.eocontrol.EOQualifier
public boolean evaluateWithObject(Object object)
evaluateWithObject
in interface com.webobjects.eocontrol.EOQualifierEvaluation
evaluateWithObject
in class com.webobjects.eocontrol.EOQualifier
Copyright © 2002 – 2020 Project Wonder.