WebObjects 5.2

com.webobjects.eocontrol
Class EOQualifierVariable

java.lang.Object
  |
  +--com.webobjects.eocontrol.EOQualifierVariable
All Implemented Interfaces:
EOKeyValueArchiving, NSCoding, Serializable

public class EOQualifierVariable
extends Object
implements Serializable, NSCoding, EOKeyValueArchiving

EOQualifierVariable defines objects that serve as placeholders in the qualifier. When you create a qualifier programmatically, you typically do something like this:

aQual = EOQualifier.qualifierWithQualifierFormat(aDate);

where aDate is a variable that contains the actual date you want to query upon. When you store the qualifier in an EOModel, there is no way to know the actual value to query upon or the variable that will contain that value. The EOQualifierVariable object acts as a placeholder for the actual variable that will represent the right side of the expression. An EOQualifierVariable is specified by using a dollar sign ($), as in the following:

dateReleased = $aDate

Variable values must be substituted for using qualifierWithBindings.

See Also:
EOQualifier.qualifierWithBindings(NSDictionary bindings, boolean requiresAll), Serialized Form

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
 
Constructor Summary
EOQualifierVariable(String key)
          Creates and returns a new EOQualifierVariable object with the specified name.
 
Method Summary
 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 keys it returns true, false otherwise.
 String key()
          Returns the specified name for the EOQualifierVariable object
 String toString()
          String representation of the name for the EOQualifierVariable object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EOQualifierVariable

public EOQualifierVariable(String key)
Creates and returns a new EOQualifierVariable object with the specified name. For example, if the qualifier "isdateReleased = $aDate", then this method would be invoked with the key "aDate".
Parameters:
key - the specified name for the EOQualifierVariable object
Method Detail

classForCoder

public 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. Default is the value of the getClass method.
Specified by:
classForCoder in interface NSCoding
Returns:
the Class to be used with an NSCoder
See Also:
encodeWithCoder(NSCoder coder), decodeObject(NSCoder coder), NSCoder, NSCoding

decodeObject

public static Object decodeObject(NSCoder coder)
(Re)creates an object based on type information and data stored in coder.
Parameters:
coder - stores object type information along with an object's data
Returns:
an object (re)created from the data in coder.
See Also:
encodeWithCoder(NSCoder coder), NSCoder, NSCoding

decodeWithKeyValueUnarchiver

public static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver)
Conforms to EOKeyValueArchiving.
Parameters:
unarchiver - the EOKeyValueArchiver object with which to decode the receiver
Returns:
the unarchived EOAndQualifier object

encodeWithCoder

public void encodeWithCoder(NSCoder coder)
Archives the receiver's type information and data into coder. The receiver can then be recreated using decodeObject. Custom type information can be used by overriding classForCoder.
Specified by:
encodeWithCoder in interface NSCoding
Parameters:
coder - stores object type information along with an object's data
See Also:
decodeObject(NSCoder coder), classForCoder(), NSCoder, NSCoding

encodeWithKeyValueArchiver

public void encodeWithKeyValueArchiver(EOKeyValueArchiver archiver)
Conforms to EOKeyValueArchiving.
Specified by:
encodeWithKeyValueArchiver in interface EOKeyValueArchiving
Parameters:
archiver - the EOKeyValueArchiver object with which to encode the receiver

equals

public boolean equals(Object other)
If the receiver and the other object have equals keys it returns true, false otherwise.
Overrides:
equals in class Object
Returns:
true if both the receiver and the other object key are equal

key

public String key()
Returns the specified name for the EOQualifierVariable object
Returns:
the key for the EOQualifierVariable object

toString

public String toString()
String representation of the name for the EOQualifierVariable object.
Overrides:
toString in class Object
Returns:
a String representing the name for the EOQualifierVariable object

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.