WebObjects 5.2.3

com.webobjects.eoaccess
Class EOSQLQualifier

java.lang.Object
  extended bycom.webobjects.eocontrol.EOQualifier
      extended bycom.webobjects.eoaccess.EOSQLQualifier
All Implemented Interfaces:
EOQualifierEvaluation, EOQualifierSQLGeneration, EOSQLExpression.SQLValue, Serializable

Deprecated. The class EOSQLQualifier is deprecated. Use EOAdaptorChannel.evaluateExpression() or EOFetchSpecification.setHints() instead.

public class EOSQLQualifier
extends EOQualifier
implements EOQualifierSQLGeneration, EOSQLExpression.SQLValue

EOSQLQualifier contains unstructured text that can be transformed into a SQL expression. EOSQLQualifier is provided for backwards compatibility with EOF 1.x products and to provide a way that programmers can create SQL expressions with any arbitrary SQL. In general, programmers should use EOQualifier whenever possible and use EOSQLQualifier only in cases that absolutely require it.

An EOSQLQualifier holds qualifications expressed in the target query language and rooted in a single EOEntity. EOSQLQualifier formats differ from EOQualifier formats. EOSQLQualifier formats are not parsed, they are simply scanned for keys and format characters. EOSQLQualifiers should only be used when one wants to use a query available in the database query language that cannot be expressed using the EOQualifier formats.

EOSQLQualifiers cannot be applied to objects in memory. See EOQualifierConcepts for more information.

See Also:
EOFetchSpecification.setHints(NSDictionary hints), EOAdaptorChannel.evaluateExpression(EOSQLExpression expression), EOQualifier, Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.webobjects.eocontrol.EOQualifier
EOQualifier.Comparison, EOQualifier.ComparisonSupport, EOQualifier.QualifierVariableSubstitutionException
 
Nested classes inherited from class com.webobjects.eoaccess.EOQualifierSQLGeneration
EOQualifierSQLGeneration.Support
 
Field Summary
 
Fields inherited from class com.webobjects.eocontrol.EOQualifier
QualifierOperatorCaseInsensitiveLike, QualifierOperatorContains, QualifierOperatorEqual, QualifierOperatorGreaterThan, QualifierOperatorGreaterThanOrEqualTo, QualifierOperatorLessThan, QualifierOperatorLessThanOrEqualTo, QualifierOperatorLike, QualifierOperatorNotEqual
 
Constructor Summary
EOSQLQualifier(EOEntity entity, String qualifierFormat, Object[] arguments)
          Deprecated. Creates an EOSQLQualifier
 
Method Summary
 void addQualifierKeysToSet(NSMutableSet qualKeys)
          Deprecated. Adds the receiver's qualifier keys to qualifierKeys.
 Object clone()
          Deprecated. Returns an exact replica of the receiver.
 void conjoinWithQualifier(EOSQLQualifier qualifier)
          Deprecated.  
 void disjoinWithQualifier(EOSQLQualifier qualifier)
          Deprecated.  
 void encodeIntoPropertyList(NSMutableDictionary result)
          Deprecated.  
 boolean isEmpty()
          Deprecated. Returns true if the qualifier is empty, false otherwise.
 void negate()
          Deprecated.  
 EOQualifier qualifierMigratedFromEntityRelationshipPath(EOEntity entity, String relationshipPath)
          Deprecated. Creates a new EOQualifier by moving the qualifier from the source entity to the destination of the relationship path.
 EOQualifier qualifierWithBindings(NSDictionary bindings, boolean requiresAll)
          Deprecated. Returns a new qualifier substituting all variables with values found in bindings.
 EOQualifier schemaBasedQualifierWithRootEntity(EOEntity entity)
          Deprecated. Returns an equivalent EOQualifier with object references replaced by foreign key references.
 void setUsesDistinct(boolean bool)
          Deprecated.  
 String sqlStringForSQLExpression(EOSQLExpression sqlExpression)
          Deprecated. Returns the SQL text that is represented by the EOSQLExpression object.
 String toString()
          Deprecated.  
 boolean usesDistinct()
          Deprecated.  
 void validateKeysWithRootClassDescription(EOClassDescription classDesc)
          Deprecated. Ensures that the receiver contains keys and key paths that belong to or originate from classDescription.
 String valueForSQLExpression(EOSQLExpression context)
          Deprecated. Conformance to EOSQLExpression.SQLValue.
 
Methods inherited from class com.webobjects.eocontrol.EOQualifier
allQualifierKeys, allQualifierOperators, bindingKeys, evaluateWithObject, filterArrayWithQualifier, filteredArrayWithQualifier, keyPathForBindingKey, operatorSelectorForSelectorNamed, operatorSelectorForString, qualifierToMatchAllValues, qualifierToMatchAnyValue, qualifierWithQualifierFormat, relationalQualifierOperators, stringForOperatorSelector
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EOSQLQualifier

public EOSQLQualifier(EOEntity entity,
                      String qualifierFormat,
                      Object[] arguments)
Deprecated. 
Creates an EOSQLQualifier

Parameters:
entity - an EOEntity
qualifierFormat - a format String
arguments - an array of Objects to substitute into qualifierFormat
Method Detail

addQualifierKeysToSet

public void addQualifierKeysToSet(NSMutableSet qualKeys)
Deprecated. 
Description copied from class: EOQualifier
Adds the receiver's qualifier keys to qualifierKeys. The subclasses in the EOControl framework do this by traversing the tree of qualifiers. Node qualifiers (such as EOAndQualifier) recursively invoke this method until they reach a leaf qualifier (such as EOKeyValueQualifier) which adds its key to the set.

Subclasses of EOQualifier must implement this method.

Specified by:
addQualifierKeysToSet in class EOQualifier
Parameters:
qualKeys - The mutable array of qualifier keys

clone

public Object clone()
Deprecated. 
Description copied from class: EOQualifier
Returns an exact replica of the receiver.

Overrides:
clone in class EOQualifier
Returns:
The exact replica of the receiver.

conjoinWithQualifier

public void conjoinWithQualifier(EOSQLQualifier qualifier)
Deprecated. 

disjoinWithQualifier

public void disjoinWithQualifier(EOSQLQualifier qualifier)
Deprecated. 

encodeIntoPropertyList

public void encodeIntoPropertyList(NSMutableDictionary result)
Deprecated. 

isEmpty

public boolean isEmpty()
Deprecated. 
Returns true if the qualifier is empty, false otherwise.

Returns:
boolean true if the qualifier is empty

negate

public void negate()
Deprecated. 

qualifierMigratedFromEntityRelationshipPath

public EOQualifier qualifierMigratedFromEntityRelationshipPath(EOEntity entity,
                                                               String relationshipPath)
Deprecated. 
Description copied from interface: EOQualifierSQLGeneration
Creates a new EOQualifier by moving the qualifier from the source entity to the destination of the relationship path. All of the keys are migrated across the specified relationshipPath.

Specified by:
qualifierMigratedFromEntityRelationshipPath in interface EOQualifierSQLGeneration
Parameters:
entity - the source entity
relationshipPath - the migration relationship path
Returns:
the migrated EOQualifier

qualifierWithBindings

public EOQualifier qualifierWithBindings(NSDictionary bindings,
                                         boolean requiresAll)
Deprecated. 
Description copied from class: EOQualifier
Returns a new qualifier substituting all variables with values found in bindings. If requiresAll is true, any variable not found in bindings throws an exception. If requiresAll is false, missing variable values cause the qualifier node to be pruned from the tree.

Specified by:
qualifierWithBindings in class EOQualifier
Parameters:
bindings - bindings dictionary
requiresAll - Value indicating if all the criteria are required
Returns:
new qualifier substituting all variables with values in bindings

schemaBasedQualifierWithRootEntity

public EOQualifier schemaBasedQualifierWithRootEntity(EOEntity entity)
Deprecated. 
Description copied from interface: EOQualifierSQLGeneration
Returns an equivalent EOQualifier with object references replaced by foreign key references.

Specified by:
schemaBasedQualifierWithRootEntity in interface EOQualifierSQLGeneration
Parameters:
entity - the source entity
Returns:
the equivalent EOQualifier

setUsesDistinct

public void setUsesDistinct(boolean bool)
Deprecated. 

sqlStringForSQLExpression

public String sqlStringForSQLExpression(EOSQLExpression sqlExpression)
Deprecated. 
Description copied from interface: EOQualifierSQLGeneration
Returns the SQL text that is represented by the EOSQLExpression object.

Specified by:
sqlStringForSQLExpression in interface EOQualifierSQLGeneration
Parameters:
sqlExpression - the EOSQLExpression object to be converted into text
Returns:
the String equivalent

toString

public String toString()
Deprecated. 

usesDistinct

public boolean usesDistinct()
Deprecated. 

validateKeysWithRootClassDescription

public void validateKeysWithRootClassDescription(EOClassDescription classDesc)
Deprecated. 
Description copied from class: EOQualifier
Ensures that the receiver contains keys and key paths that belong to or originate from classDescription. This method raises an exception if an unknown key is found, otherwise it returns null to indicate that the keys contained by the qualifier are valid.

Specified by:
validateKeysWithRootClassDescription in class EOQualifier
Parameters:
classDesc - The EOClassDescription to be checked with the receiver

valueForSQLExpression

public String valueForSQLExpression(EOSQLExpression context)
Deprecated. 
Conformance to EOSQLExpression.SQLValue.

Specified by:
valueForSQLExpression in interface EOSQLExpression.SQLValue
Parameters:
context - specify SQL expression
Returns:
a String to be used to represent the receiver in an SQL statement

Last updated Thu Oct 21 15:04:16 PDT 2004.

Copyright © 2004 Apple Computer, Inc.