- Inherits from:
- Object
- Package:
- com.apple.client.eocontrol
EOKeyValueCoding.Support provides default implementations of the EOKeyValueCoding interface.
Note: This class doesn't exist in the com.apple.yellow.eocontrol package. |
An EOCustomObject uses EOKeyValueCoding.Support's default implementations. Typically your custom enterprise object classes inherit from EOCustomObject and inherit the default implementations. EOKeyValueCoding.Support also enables you to put non-enterprise objects into the interface layer by declaring that your class conforms to key-value coding.
The methods in the Support class are just like the methods defined by the EOKeyValueCoding interface, except they are all static methods and they take an extra argument-the enterprise object on which the default implementation should operate. For example, suppose you want to implement an Employee enterprise object class that doesn't inherit from EOCustomObject but that uses Support's default implementations. Employee's valueForKey method would look like this:
public Object valueForKey(String key) return EOKeyValueCoding.Support.valueForKey(this, key); }
- Accessing values
- storedValueForKey
- takeStoredValueForKey
- takeValueForKey
- valueForKey
- Handling error conditions
- handleQueryWithUnboundKey
- handleTakeValueForUnboundKey
- unableToSetNullForKey
public static Object
handleQueryWithUnboundKey
(
Object anObject,
String key)
See Also: handleQueryWithUnboundKey (EOKeyValueCoding)
public static void
handleTakeValueForUnboundKey
(
Object anObject,
Object value,
String key)
See Also: handleTakeValueForUnboundKey (EOKeyValueCoding)
public static Object
storedValueForKey
(
Object anObject,
String key)
storedValueForKey
resolves key with
a different method-instance variable search order:storedValueForKey
looks
for a method named _getLastName or _lastName.storedValueForKey
looks
for an instance variable named _lastName
or lastName
.storedValueForKey
searches
for a public accessor method based on key.
For the key "lastName", this would be getLastName or lastName.See Also: storedValueForKey (EOKeyValueCoding)
public static void
takeStoredValueForKey
(
Object anObject,
Object value,
String key)
takeStoredValueForKey
looks
for a method named _setLastName.takeStoredValueForKey
looks
for an instance variable named _lastName
or lastName
.takeStoredValueForKey
searches
for a public accessor method based on key.
For the key "lastName", this would be setLastName.See Also: takeStoredValueForKey (EOKeyValueCoding)
public static void
takeValueForKey
(
Object anObject,
Object value,
String key)
null
and key identifies
a scalar property. The default implementation works as follows:set
Key,
invoking it if there is one._set
Key, invoking
it if there is one.true
, takeValueForKey
searches
for an instance variable based on key and sets
the value directly. For the key "lastName", this would be _lastName
or lastName
.See Also: takeValueForKey (EOKeyValueCoding)
public static void
unableToSetNullForKey
(
Object anObject,
String key)
See Also: unableToSetNullForKey (EOKeyValueCoding)
public static Object
valueForKey
(
Object anObject,
String key)
valueForKey
looks
for a method named getLastName or lastName.valueForKey
looks
for a method named _getLastName or _lastName.true
, valueForKey
searches
for an instance variable based on key and
returns its value directly. For the key "lastName", this would
be _lastName or lastName.See Also: valueForKey (EOKeyValueCoding)