er.extensions
Class ERXQualifierInSubquery
java.lang.Object
com.webobjects.eocontrol.EOQualifier
er.extensions.ERXQualifierInSubquery
- All Implemented Interfaces:
- Cloneable, EOQualifierEvaluation, EOQualifierSQLGeneration, Serializable
- public class ERXQualifierInSubquery
- extends EOQualifier
- implements EOQualifierSQLGeneration, Cloneable
Generates a subquery for the qualifier given in argument
... t0.ID IN (SELECT t0.ID FROM X WHERE ) ..
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 )
with the 3 arg constructor
- See Also:
- Serialized Form
Methods inherited from class com.webobjects.eocontrol.EOQualifier |
_accept, _isEmpty, allQualifierKeys, allQualifierOperators, bindingKeys, evaluateWithObject, filterArrayWithQualifier, filteredArrayWithQualifier, keyPathForBindingKey, operatorSelectorForSelectorNamed, operatorSelectorForString, qualifierToMatchAllValues, qualifierToMatchAnyValue, qualifierWithQualifierFormat, relationalQualifierOperators, stringForOperatorSelector |
log
public static final ERXLogger log
- logging support
qualifier
protected EOQualifier qualifier
- holds the subqualifier
entityName
protected String entityName
- holds the entity name
attributeName
protected String attributeName
- holds the attribute name
destinationAttName
protected String destinationAttName
ERXQualifierInSubquery
public ERXQualifierInSubquery(EOQualifier q)
- Public single argument constructor. Use
this constructor for sub-qualification
on the same table.
- Parameters:
q
- sub-qualifier
ERXQualifierInSubquery
public ERXQualifierInSubquery(EOQualifier q,
String entityName,
String attributeName,
String destinationAttName)
- Public three argument constructor. Use
this constructor for for building queries
on foreign key attributes of the current
entity.
- Parameters:
q
- sub qualifierentityName
- of the sub qualificationattributeName
- foriegn key attribute name
addQualifierKeysToSet
public void addQualifierKeysToSet(NSMutableSet aSet)
- Only used with qualifier keys which are not supported in
this qualifier at this time. Does nothing.
- Parameters:
aSet
- of qualifier keys
qualifierWithBindings
public EOQualifier qualifierWithBindings(NSDictionary someBindings,
boolean requiresAll)
- Creates another qualifier after replacing the values of the bindings.
Since this qualifier does not support qualifier binding keys a clone
of the qualifier is returned.
- Parameters:
someBindings
- some bindingsrequiresAll
- tells if the qualifier requires all bindings
- Returns:
- clone of the current qualifier.
validateKeysWithRootClassDescription
public void validateKeysWithRootClassDescription(EOClassDescription aClassDescription)
- This qualifier does not perform validation. This
is a no-op method.
- Parameters:
aClassDescription
- to validation the qualifier keys
against.
sqlStringForSQLExpression
public String sqlStringForSQLExpression(EOSQLExpression e)
- Generates the sql string for the given sql expression.
Bulk of the logic for generating the sub-query is in
this method.
- Specified by:
sqlStringForSQLExpression
in interface EOQualifierSQLGeneration
- Parameters:
e
- a given sql expression
- Returns:
- sql string for the current sub-query.
schemaBasedQualifierWithRootEntity
public EOQualifier schemaBasedQualifierWithRootEntity(EOEntity anEntity)
- Implementation of the EOQualifierSQLGeneration interface. Just
clones the qualifier.
- Specified by:
schemaBasedQualifierWithRootEntity
in interface EOQualifierSQLGeneration
- Parameters:
anEntity
- an entity.
- Returns:
- clone of the current qualifier.
qualifierMigratedFromEntityRelationshipPath
public EOQualifier qualifierMigratedFromEntityRelationshipPath(EOEntity anEntity,
String aPath)
- Implementation of the EOQualifierSQLGeneration interface. Just
clones the qualifier.
- Specified by:
qualifierMigratedFromEntityRelationshipPath
in interface EOQualifierSQLGeneration
- Parameters:
anEntity
- an entityaPath
- relationship path
- Returns:
- clone of the current qualifier.
toString
public String toString()
- Description of the qualifier
- Returns:
- human readable description of the qualifier.
clone
public Object clone()
- Implementation of the Clonable interface. Clones the current qualifier.
- Returns:
- cloned qualifier.
Copyright © 2002 – 2004 Project Wonder.