WebObjects 5.4.2

com.webobjects.eocontrol
Class EOKeyValueCodingAdditions.DefaultImplementation

java.lang.Object
  extended by com.webobjects.eocontrol.EOKeyValueCodingAdditions.DefaultImplementation
Enclosing interface:
EOKeyValueCodingAdditions

public static class EOKeyValueCodingAdditions.DefaultImplementation
extends Object

The EOKeyValueCodingAdditions.DefaultImplementation class provides the WebObjects default implementation of the EOKeyValueCodingAdditions interface.

See Also:
EOKeyValueCodingAdditions

Method Summary
static void takeValuesFromDictionary(Object object, NSDictionary dictionary)
          Sets properties of object with values from dictionary, using its keys to identify the properties.
static void takeValuesFromDictionaryWithMapping(Object object, NSDictionary dictionary, NSDictionary mapping)
          Sets properties of object with values from dictionary, using its keys and mapping to identify the properties.
static NSDictionary valuesForKeys(Object object, NSArray keys)
          Returns a dictionary containing the property values of object identified by each of keys.
static NSDictionary valuesForKeysWithMapping(Object object, NSDictionary mapping)
          Returns a dictionary containing the property values of object identified by each of the key-value pairs in mapping.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

valuesForKeys

public static NSDictionary valuesForKeys(Object object,
                                         NSArray keys)
Returns a dictionary containing the property values of object identified by each of keys. Invokes valueForKey (or the corresponding NSKeyValueCoding.DefaultImplementation method) for each key in keys, substituting NSKeyValueCoding.NullValue in the returned dictionary for returned null values.

Parameters:
object - the object to operate upon
keys - the array of keys whose values are to be retrieved
Returns:
a dictionary containing the property values identified by each of keys
See Also:
NSKeyValueCoding.valueForKey(String)

valuesForKeysWithMapping

public static NSDictionary valuesForKeysWithMapping(Object object,
                                                    NSDictionary mapping)
Returns a dictionary containing the property values of object identified by each of the key-value pairs in mapping. The keys of the mapping dictionary represent arbitrary external names for properties of an Enterprise Object and the values are the internal or EOModel names for these properties. Invokes valueForKey (or the corresponding NSKeyValueCoding.DefaultImplementation method) for each value in mapping, substituting NSKeyValueCoding.NullValue in the returned dictionary for returned null values.

Parameters:
object - the object to operate upon
mapping - the dictionary that maps arbitrary external names to internal property names
Returns:
a dictionary containing the property values identified by each of keys (external names) in mapping
See Also:
NSKeyValueCoding.valueForKey(String)

takeValuesFromDictionary

public static void takeValuesFromDictionary(Object object,
                                            NSDictionary dictionary)
Sets properties of object with values from dictionary, using its keys to identify the properties. Invokes takeValueForKey (or the corresponding NSKeyValueCoding.DefaultImplementation method) for each key-value pair, substituting null for NSKeyValueCoding.NullValue values in the dictionary.

Parameters:
object - the object to operate upon
dictionary - the key-value pairs to be set
See Also:
NSKeyValueCoding.takeValueForKey(Object, String)

takeValuesFromDictionaryWithMapping

public static void takeValuesFromDictionaryWithMapping(Object object,
                                                       NSDictionary dictionary,
                                                       NSDictionary mapping)
Sets properties of object with values from dictionary, using its keys and mapping to identify the properties. mapping associates the keys of dictionary, which are arbitrary external names for the properties to be set, with the internal or EOModel names for those properties. If a key in dictionary does not have a corresponding entry in mapping, the external key (i.e., the key from dictionary) is used.

Invokes takeValueForKey (or the corresponding NSKeyValueCoding.DefaultImplementation method)for each key-value pair of dictionary, substituting null for NSKeyValueCoding.NullValue values in the dictionary.

Parameters:
object - the object to operate upon
dictionary - the key-value pairs to be set
mapping - the dictionary that maps arbitrary external names to internal property names
See Also:
NSKeyValueCoding.takeValueForKey(Object, String)

Last updated June 2008

Copyright © 2000-2008 Apple Inc.