PATH Documentation > WebObjects

Table of Contents

EONotQualifier


Inherits from:
EOQualifier
Implements:
NSCoding
EOKeyValueArchiving
Package:
com.webobjects.eocontrol


Class Description


EONotQualifier is a subclass of EOQualifier that contains a single qualifier. When an EONotQualifier object is evaluated, it returns the inverse of the result obtained by evaluating the qualifier it contains.

EONotQualifier implements the EOQualifierEvaluation interface, which defines the method evaluateWithObject for in-memory evaluation. When an EONotQualifier object receives an evaluateWithObject message, it evaluates the given object to determine if it satisfies the qualifier criteria.

You can generate SQL code for an EONotQualifier using the EOSQLExpression static method sqlStringForNegatedQualifier.




Interfaces Implemented


EOQualifierEvaluation
evaluateWithObject
NSCoding
classForCoder
decodeObject
encodeWithCoder
EOKeyValueArchiving
decodeWithKeyValueUnarchiver
encodeWithKeyValueArchiver


Constructors



EONotQualifier

public com.webobjects.eocontrol.EONotQualifier(EOQualifier aQualifier)

Creates and returns a new EONotQualifier

If aQualifier is specified, it is used as the qualifier. For example, the following code excerpt constructs a qualifier, baseQual, and uses it to initialize an EONotQualifier, negQual. The EONotQualifier negQual is then used to filter an in-memory array. The code excerpt returns an array of Guest objects whose lastName properties do not have the same value as the lastName property of the guest's sponsoring member (this example is based on the Rentals sample database). In other words, the EONotQualifier negQual inverts the effects of baseQual.



NSArray guests /* Assume this exists */
EOQualifier baseQual;
EONotQualifier negQual;

baseQual = EOQualifier.qualifierWithQualifierFormat("lastName = member.lastName", null);
negQual = new EONotQualifier(baseQual);
return EOQualifier.filteredArrayWithQualifier(guests, negQual);




Static Methods



decodeObject

public static Object decodeObject(NSCoder coder)

Conformance to NSCoding.

decodeWithKeyValueUnarchiver

public static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver)

Conformance to EOKeyValueArchiving.


Instance Methods



addQualifierKeysToSet

public void addQualifierKeysToSet(NSMutableSet aSet)

Description forthcoming.

classForCoder

public Class classForCoder()

Conformance to NSCoding.

encodeWithKeyValueArchiver

public void encodeWithKeyValueArchiver(EOKeyValueArchiver archiver)

Conformance to EOKeyValueArchiving.

encodeWithCoder

public void encodeWithCoder(NSCoder coder)

Conformance to NSCoding.

evaluateWithObject

public boolean evaluateWithObject(NSKeyValueCodingAdditions anObject)

Returns true if the object anObject satisfies the EONotQualifier, false otherwise. This method can throw one of several possible exceptions if an error occurs. If your application allows users to construct arbitrary qualifiers (such as through a user interface), you may want to write code to catch any exceptions and respond to errors (for example, by displaying a panel saying that the user typed a poorly formed qualifier).

qualifier

public EOQualifier qualifier()

Returns the receiver's qualifier.

qualifierWithBindings

public EOQualifier qualifierWithBindings( NSDictionary, boolean)

Description forthcoming.

toString

public String toString()

Description forthcoming.

validateKeysWithRootClassDescription

public void validateKeysWithRootClassDescription(EOClassDescription classDesc)

Ensures that the receiver contains keys and key paths that belong to or originate from classDesc. 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.

© 2001 Apple Computer, Inc. (Last Published April 19, 2001)


Table of Contents