|
WebObjects 5.2.3 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.webobjects.eocontrol.EOQualifier com.webobjects.eocontrol.EONotQualifier
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
.
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.foundation.NSCoding |
NSCoding.Support |
Nested classes inherited from class com.webobjects.eocontrol.EOKeyValueArchiving |
EOKeyValueArchiving.Awaking, EOKeyValueArchiving.FinishInitialization, EOKeyValueArchiving.Support |
Field Summary |
Fields inherited from class com.webobjects.eocontrol.EOQualifier |
QualifierOperatorCaseInsensitiveLike, QualifierOperatorContains, QualifierOperatorEqual, QualifierOperatorGreaterThan, QualifierOperatorGreaterThanOrEqualTo, QualifierOperatorLessThan, QualifierOperatorLessThanOrEqualTo, QualifierOperatorLike, QualifierOperatorNotEqual |
Constructor Summary | |
EONotQualifier(EOQualifier qualifier)
Creates and returns a new EONotQualifier. |
Method Summary | |
void |
addQualifierKeysToSet(NSMutableSet qualKeys)
Adds the receiver's qualifier keys to qualKeys . |
Class |
classForCoder()
Allows the receiver, before being encoded, to substitute a class other than its own in a coder. |
static Object |
decodeObject(NSCoder coder)
|
static Object |
decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver)
|
void |
encodeWithCoder(NSCoder coder)
Encodes the receiver using coder . |
void |
encodeWithKeyValueArchiver(EOKeyValueArchiver archiver)
Asks the receiver to archive its state into the EOKeyValueArchiver archiver . |
boolean |
equals(Object other)
|
boolean |
evaluateWithObject(Object object)
Returns true if the object object satisfies the EONotQualifier,
false otherwise. |
EOQualifier |
qualifier()
|
EOQualifier |
qualifierWithBindings(NSDictionary bindings,
boolean requiresAll)
Returns a new qualifier substituting all variables with values found in bindings . |
String |
toString()
Converts the receiver to a string. |
void |
validateKeysWithRootClassDescription(EOClassDescription classDesc)
Ensures that the receiver contains keys and key paths that belong to or originate from classDesc . |
Methods inherited from class com.webobjects.eocontrol.EOQualifier |
allQualifierKeys, allQualifierOperators, bindingKeys, clone, filterArrayWithQualifier, filteredArrayWithQualifier, keyPathForBindingKey, operatorSelectorForSelectorNamed, operatorSelectorForString, qualifierToMatchAllValues, qualifierToMatchAnyValue, qualifierWithQualifierFormat, relationalQualifierOperators, stringForOperatorSelector |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public EONotQualifier(EOQualifier qualifier)
If qualifier
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 EOQualifier baseQual; EONotQualifier negQual; baseQual = EOQualifier.qualifierWithQualifierFormat(lastName = member.lastName, null); negQual = new EONotQualifier(baseQual); return EOQualifier.filteredArrayWithQualifier(guests, negQual);
qualifier
- abstract class for objects that hold information used
to restrict selections on objects or database rows
according to specified criteria.Method Detail |
public void addQualifierKeysToSet(NSMutableSet qualKeys)
qualKeys
. 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.
addQualifierKeysToSet
in class EOQualifier
qualKeys
- input array of qualifier keyspublic Class classForCoder()
NSCoding
classForCoder
in interface NSCoding
public static Object decodeObject(NSCoder coder)
coder
- input array of data
public static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver)
unarchiver
- source of archived qualifier
public void encodeWithCoder(NSCoder coder)
NSCoding
coder
. Object type information along with an
object's data is stored.
encodeWithCoder
in interface NSCoding
coder
- the input array with dataNSCoder
public void encodeWithKeyValueArchiver(EOKeyValueArchiver archiver)
EOKeyValueArchiving
archiver
.
encodeWithKeyValueArchiver
in interface EOKeyValueArchiving
archiver
- destination for archived qualifierEOKeyValueArchiver
public boolean equals(Object other)
other
- target of comparison
true
if this qualifier is equal to the input objectpublic boolean evaluateWithObject(Object object)
true
if the object object
satisfies the EONotQualifier,
false
otherwise. This method can throw one of several possible exceptions
if an error occurs. If the 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).
evaluateWithObject
in interface EOQualifierEvaluation
evaluateWithObject
in class EOQualifier
object
- the input object
true
if the object object satisfies the EONotQualifier,
false
otherwise
exception
- when an error occurspublic EOQualifier qualifier()
public EOQualifier qualifierWithBindings(NSDictionary bindings, boolean requiresAll)
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.
qualifierWithBindings
in class EOQualifier
bindings
- the input array with bindingsrequiresAll
- true
if all the values are required, false
otherwise
public String toString()
public void validateKeysWithRootClassDescription(EOClassDescription classDesc)
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.
validateKeysWithRootClassDescription
in class EOQualifier
classDesc
- bridge between enterprise objects and the metadata
contained in an external source of information.
exception
- if unknown key is found
|
Last updated Thu Oct 21 15:04:16 PDT 2004. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |