|
WebObjects 5.4.2 | ||||||||
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.EOOrQualifier
public class EOOrQualifier
EOOrQualifier is a subclass of EOQualifier that contains multiple qualifiers. EOOrQualifier implements the EOQualifierEvaluation interface, which defines the method evaluateWithObject
for in-memory evaluation. When an EOOrQualifier object receives an evaluateWithObject
message, it evaluates each of its qualifiers until one of them returns true
. If
one of its qualifiers returns true
, the EOOrQualifier object returns true
immediately.If all of its qualifiers return false
, the EOOrQualifier object
returns false
.
EOOrQualifier.evaluateWithObject(Object object)
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class com.webobjects.eocontrol.EOQualifier |
---|
EOQualifier.Comparison, EOQualifier.ComparisonSupport, EOQualifier.QualifierVariableSubstitutionException |
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSCoding |
---|
NSCoding.Support |
Nested classes/interfaces inherited from interface 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 | |
---|---|
EOOrQualifier(NSArray qualifiers)
Creates and returns a new EOOrQualifier. |
Method Summary | |
---|---|
void |
addQualifierKeysToSet(NSMutableSet qualKeys)
Adds the receiver's qualifier keys to qualKeys . |
Class |
classForCoder()
Allows the receiver to substitute a class other than its own (for example, a public superclass) for use during archiving (encoding) by an NSCoder. |
static Object |
decodeObject(NSCoder coder)
(Re)creates an object based on type information and data stored in coder . |
static Object |
decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver)
Conforms to EOKeyValueArchiving. |
void |
encodeWithCoder(NSCoder coder)
Archives the receiver's type information and data into coder . |
void |
encodeWithKeyValueArchiver(EOKeyValueArchiver archiver)
Conforms to EOKeyValueArchiving. |
boolean |
equals(Object other)
If the receiver and the other object have equals qualifiers it returns true ; false otherwise. |
boolean |
evaluateWithObject(Object object)
Returns true if object satisfies the qualifier, false otherwise. |
NSArray |
qualifiers()
The qualifiers contained in the receiver. |
EOQualifier |
qualifierWithBindings(NSDictionary bindings,
boolean requiresAll)
Returns a qualifier with the values associated by the bindings. |
String |
toString()
String containing the description of all the qualifiers contained on receiver. |
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 EOOrQualifier(NSArray qualifiers)
qualifiers
is provided, the EOOrQualifier is initialized with the qualifiers in qualifiers
.
qualifiers
- specifies qualifierMethod Detail |
---|
public NSArray qualifiers()
public boolean equals(Object other)
other
object have equals qualifiers it returns true
; false
otherwise.
equals
in class Object
true
if both the receiver and the other
object qualifiers are equalpublic boolean evaluateWithObject(Object object)
true
if object
satisfies the qualifier, false
otherwise. When an EOOrQualifier object receives an evaluateWithObject
message,
it evaluates each of its qualifiers until one of them returns true
. If any of its qualifiers returns true
, the EOOrQualifier object returns true
immediately. If all of its qualifiers return false
, the EOOrQualifier object returns false
. This method can throw one of several possible exceptions if an error
occurs. If application allows users to construct arbitrary qualifiers (such as through a user interface), user 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
- specifies object which satisfies the qualifier
true
if anObject satisfies the qualifier, false
otherwisepublic String toString()
toString
in class Object
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
- specifies class descriptionpublic EOQualifier qualifierWithBindings(NSDictionary bindings, boolean requiresAll)
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 of valuesrequiresAll
- true
if all the value are required; otherwise false
public void addQualifierKeysToSet(NSMutableSet qualKeys)
qualKeys
. EOOrQualifier does this by traversing the tree of qualifiers. Recursively it invokes this method until it reaches a leaf
qualifier (such as EOKeyValueQualifier) which adds its key to the set.
addQualifierKeysToSet
in class EOQualifier
qualKeys
- the mutable array of qualifier keyspublic Class classForCoder()
getClass
method.
classForCoder
in interface NSCoding
EOOrQualifier.encodeWithCoder(NSCoder coder)
,
EOOrQualifier.decodeObject(NSCoder coder)
,
NSCoder
,
NSCoding
public static Object decodeObject(NSCoder coder)
coder
.
coder
- stores object type information along with an object's data
coder
EOOrQualifier.encodeWithCoder(NSCoder coder)
,
NSCoder
,
NSCoding
public void encodeWithCoder(NSCoder coder)
coder
. The receiver can then be recreated using decodeObject
. Custom type information can be used by
overriding classForCoder
.
encodeWithCoder
in interface NSCoding
coder
- stores object type information along with an object's dataEOOrQualifier.decodeObject(NSCoder coder)
,
EOOrQualifier.classForCoder()
,
NSCoder
,
NSCoding
public void encodeWithKeyValueArchiver(EOKeyValueArchiver archiver)
encodeWithKeyValueArchiver
in interface EOKeyValueArchiving
archiver
- the EOKeyValueArchiver object with which to encode the receiverEOKeyValueArchiver
public static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver)
unarchiver
- the EOKeyValueArchiver object with which to decode the receiver
|
Last updated June 2008 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |