|
WebObjects 5.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.webobjects.eocontrol.EOQualifier | +--com.webobjects.eocontrol.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
.
evaluateWithObject(Object object)
, Serialized FormInner classes inherited from class com.webobjects.eocontrol.EOQualifier |
EOQualifier.Comparison, EOQualifier.ComparisonSupport, EOQualifier.QualifierVariableSubstitutionException |
Inner classes inherited from class com.webobjects.foundation.NSCoding |
NSCoding.Support |
Inner classes inherited from class com.webobjects.eocontrol.EOKeyValueArchiving |
EOKeyValueArchiving.Awaking, EOKeyValueArchiving.FinishInitialization, EOKeyValueArchiving.Support |
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 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
encodeWithCoder(NSCoder coder)
,
decodeObject(NSCoder coder)
,
NSCoder
,
NSCoding
public static Object decodeObject(NSCoder coder)
coder
.coder
- stores object type information along with an object's datacoder
.encodeWithCoder(NSCoder coder)
,
NSCoder
,
NSCoding
public static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver)
unarchiver
- The EOKeyValueArchiver object with which to decode
the receiverpublic 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 datadecodeObject(NSCoder coder)
,
classForCoder()
,
NSCoder
,
NSCoding
public void encodeWithKeyValueArchiver(EOKeyValueArchiver archiver)
encodeWithKeyValueArchiver
in interface EOKeyValueArchiving
archiver
- the EOKeyValueArchiver object with which to encode
the receiverpublic 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 class EOQualifier
object
- input object to be evaluatedtrue
if anObject
satisfies the qualifier, false
otherwisepublic 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 NSArray qualifiers()
EOAndQualifier(NSArray qualifiers)
public 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 qualifier contains
valid keys.validateKeysWithRootClassDescription
in class EOQualifier
classDesc
- the bridge between enterprise objects and the metadata
contained in an external source of information
|
Last updated Fri Feb 21 13:15:00 PST 2003. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |