net.wotonomy.control
Class EOKeyValueCodingSupport

java.lang.Object
  extended by net.wotonomy.control.EOKeyValueCodingSupport

public class EOKeyValueCodingSupport
extends java.lang.Object

EOKeyValueCodingSupport defines default behavior for classes implementing EOKeyValueSupport.

On an object that does not implement EOKeyValueCoding, wotonomy will call the methods on this class directly.

Version:
$Revision: 894 $
Author:
michael@mpowers.net, $Author: cgruber $

Constructor Summary
EOKeyValueCodingSupport()
           
 
Method Summary
static java.lang.Object handleQueryWithUnboundKey(java.lang.Object anObject, java.lang.String aKey)
          Called by valueForKey when the specified key is not found on the specified object, if that object does not implement EOKeyValueCoding.
static void handleTakeValueForUnboundKey(java.lang.Object anObject, java.lang.Object aValue, java.lang.String aKey)
          Called by takeValueForKey when the specified key is not found on the specified object, if that object does not implement EOKeyValueCoding.
static java.lang.Object storedValueForKey(java.lang.Object anObject, java.lang.String aKey)
          Returns the value for the private field that corresponds to the specified property on the specified object.
static void takeStoredValueForKey(java.lang.Object anObject, java.lang.Object aValue, java.lang.String aKey)
          Sets the the private field that corresponds to the specified property to the specified value on the specified object.
static void takeValueForKey(java.lang.Object anObject, java.lang.Object aValue, java.lang.String aKey)
          Sets the property to the specified value on the specified object.
static void unableToSetNullForKey(java.lang.Object anObject, java.lang.String aKey)
          Called by takeValueForKey when the type of the specified key is not allowed to be null, as is the case with primitive types, if the specified object does not implement EOKeyValueCoding.
static java.lang.Object valueForKey(java.lang.Object anObject, java.lang.String aKey)
          Returns the value for the specified property key on the specified object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EOKeyValueCodingSupport

public EOKeyValueCodingSupport()
Method Detail

valueForKey

public static java.lang.Object valueForKey(java.lang.Object anObject,
                                           java.lang.String aKey)
Returns the value for the specified property key on the specified object.

If the property does not exist, this method calls handleQueryWithUnboundKey on the object if it implements EOKeyValueCoding, otherwise calls handleQueryWithUnboundKey on this class.


takeValueForKey

public static void takeValueForKey(java.lang.Object anObject,
                                   java.lang.Object aValue,
                                   java.lang.String aKey)
Sets the property to the specified value on the specified object. If the property does not exist, this method calls handleTakeValueForUnboundKey on the object if it implements EOKeyValueCoding, otherwise calls handleTakeValueForUnboundKey on this class. If the property is of a type that cannot allow null (e.g. primitive types) and aValue is null, this method should call unableToSetNullForKey on the object if it implements EOKeyValueCoding, otherwise calls unableToSetNullForKey on this class.


storedValueForKey

public static java.lang.Object storedValueForKey(java.lang.Object anObject,
                                                 java.lang.String aKey)
Returns the value for the private field that corresponds to the specified property on the specified object. This implementation currently calls valueForKey, because java security currently prevents us from accessing the fields of another object.


takeStoredValueForKey

public static void takeStoredValueForKey(java.lang.Object anObject,
                                         java.lang.Object aValue,
                                         java.lang.String aKey)
Sets the the private field that corresponds to the specified property to the specified value on the specified object. This implementation currently calls takeValueForKey, because java security currently prevents us from accessing the fields of another object.


handleQueryWithUnboundKey

public static java.lang.Object handleQueryWithUnboundKey(java.lang.Object anObject,
                                                         java.lang.String aKey)
Called by valueForKey when the specified key is not found on the specified object, if that object does not implement EOKeyValueCoding. This implementation throws a WotonomyException.


handleTakeValueForUnboundKey

public static void handleTakeValueForUnboundKey(java.lang.Object anObject,
                                                java.lang.Object aValue,
                                                java.lang.String aKey)
Called by takeValueForKey when the specified key is not found on the specified object, if that object does not implement EOKeyValueCoding. This implementation throws a WotonomyException.


unableToSetNullForKey

public static void unableToSetNullForKey(java.lang.Object anObject,
                                         java.lang.String aKey)
Called by takeValueForKey when the type of the specified key is not allowed to be null, as is the case with primitive types, if the specified object does not implement EOKeyValueCoding. This implementation throws a WotonomyException.



Copyright © 2006 null. All Rights Reserved.