|
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.EOAndQualifier
public class EOAndQualifier
EOAndQualifier is a subclass of EOQualifier that contains multiple qualifiers. EOAndQualifier implements the EOQualifierEvaluation
interface, which defines the method
evaluateWithObject
for in-memory evaluation. When an EOAndQualifier object receives an evaluateWithObject
message, it evaluates each of its qualifiers until one of
them returns false
. If one of its qualifiers returns false
, the EOAndQualifier object returns false
immediately. If all of its qualifiers return
true
, the EOAndQualifier object returns true
.
EOAndQualifier.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 | |
---|---|
EOAndQualifier(NSArray qualifiers)
Creates a new EOAndQualifier. |
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)
|
boolean |
evaluateWithObject(Object object)
When an EOAndQualifier object receives an evaluateWithObject message, it evaluates each of its qualifiers until one of them returns false . |
NSArray |
qualifiers()
The qualifiers contained in the receiver. |
EOQualifier |
qualifierWithBindings(NSDictionary bindings,
boolean requiresAll)
If requiresAll is true , any variable not found in bindings throws an exception. |
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 EOAndQualifier(NSArray qualifiers)
qualifiers
is provided, the new EOAndQualifier is initialized with the objects in qualifiers
.
qualifiers
- immutable array of EOQualifier objectsMethod Detail |
---|
public NSArray qualifiers()
EOAndQualifier.EOAndQualifier(NSArray qualifiers)
public boolean equals(Object other)
equals
in class Object
public boolean evaluateWithObject(Object object)
evaluateWithObject
message, it evaluates each of its qualifiers until one of them returns false
. If any of its
qualifiers returns false
, the EOAndQualifier object returns false
immediately. If all of its qualifiers return true
, the object returns
true
. This method can throw several possible exceptions if an error occurs. If the application allows users to construct arbitrary qualifiers (such as through a user interface),
you should write code to catch any exceptions and properly 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
- input object to be evaluated
true
if anObject
satisfies the qualifier, false
otherwisepublic void validateKeysWithRootClassDescription(EOClassDescription classDesc)
classDesc
. This method raises an exception if an unknown key is found. Otherwise, it
returns null
to indicate that the qualifier contains valid keys.
validateKeysWithRootClassDescription
in class EOQualifier
classDesc
- the bridge between enterprise objects and the metadata contained in an external source of informationpublic String toString()
toString
in class Object
public 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
exception
- when variable not found in bindings.public void addQualifierKeysToSet(NSMutableSet qualKeys)
qualKeys
. The subclasses in the EOControl layer 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
- the mutable array of qualifier keys.public Class classForCoder()
getClass
method.
classForCoder
in interface NSCoding
EOAndQualifier.encodeWithCoder(NSCoder coder)
,
EOAndQualifier.decodeObject(NSCoder coder)
,
NSCoder
,
NSCoding
public static Object decodeObject(NSCoder coder)
coder
.
coder
- stores object type information along with an object's data
coder
.EOAndQualifier.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 dataEOAndQualifier.decodeObject(NSCoder coder)
,
EOAndQualifier.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 |