PATH Documentation > WebObjects

Table of Contents

EOKeyValueCodingAdditions


(informal interface)
Implemented by:
EOEnterpriseObject
EOCustomObject
EOGenericRecord
Implements:
EOKeyValueCoding
NSKeyValueCodingAdditions
Package:
com.webobjects.eocontrol

Interface Description


The EOKeyValueCodingAdditions interface defines extensions to the basic EOKeyValueCoding interface. One pair of methods, takeValuesFromDictionary and valuesForKeys, gives access to groups of properties. Another pair of methods, takeValueForKey and valueForKey give access to properties across relationships with key paths of the form relationship.property; for example, "department.name". EOCustomObject and EOGenericRecord provide default implementations of EOKeyValueCodingAdditions, which you rarely (if ever) need to override.


EONullValue in Collections

Because collection objects such as NSArray and NSDictionary can't contain null as a value, null must be represented by a special object, EONullValue. EONullValue provides a single instance that represents the NULL value for object attributes. The default implementations of takeValuesFromDictionary and valuesForKeys translate EONullValue and null between NSDictionaries and enterprise objects so your objects don't have to explicitly test for EONullValues.



Instance Methods



takeValuesFromDictionary

public abstract void takeValuesFromDictionary(NSDictionary aDictionary)

Sets properties of the receiver with values from aDictionary, using its keys to identify the properties. EOCustomObject's implementation invokes takeValueForKey for each key-value pair, substituting null for EONullValues in aDictionary.

valuesForKeys

public abstract NSDictionary valuesForKeys(NSArray keys)

Returns a dictionary containing the property values identified by each of keys. EOCustomObject's implementation invokes valueForKey for each key in keys, substituting EONullValues in the dictionary for returned null values.

© 2001 Apple Computer, Inc. (Last Published April 19, 2001)


Table of Contents