net.wotonomy.control
Interface EOKeyValueCoding

All Superinterfaces:
net.wotonomy.foundation.NSKeyValueCoding
All Known Subinterfaces:
EOEnterpriseObject, EOKeyValueCodingAdditions
All Known Implementing Classes:
EOCustomObject, EOGenericRecord

public interface EOKeyValueCoding
extends net.wotonomy.foundation.NSKeyValueCoding

EOKeyValueCoding defines an interface for classes that need to have more control over the wotonomy's property introspection facilities.

On an object that implements this interface, wotonomy will call these methods, and otherwise use the static methods on EOKeyValueCodingSupport.

EOKeyValueCodingSupport implements the default behaviors for each of these methods, so classes implementing this interface can call those methods to acheive the same behavior.

valueForKey and takeValueForKey are called in response to user actions, like viewing an object or updating its value in a user interface. These should call the public getter and setter methods on the object itself and the operations should be subject to validation.

storedValueForKey and takeStoredValueForKey are called in response to wotonomy actions, like snapshotting, faulting, commits, and reverts. These operations should bypass the public methods and directly modify the internal state of the object without validation.

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

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.wotonomy.foundation.NSKeyValueCoding
net.wotonomy.foundation.NSKeyValueCoding.DefaultImplementation, net.wotonomy.foundation.NSKeyValueCoding.Null, net.wotonomy.foundation.NSKeyValueCoding.Utility
 
Field Summary
 
Fields inherited from interface net.wotonomy.foundation.NSKeyValueCoding
NullValue
 
Method Summary
 java.lang.Object handleQueryWithUnboundKey(java.lang.String aKey)
          Called by valueForKey when the specified key is not found on this object.
 void handleTakeValueForUnboundKey(java.lang.Object aValue, java.lang.String aKey)
          Called by takeValueForKey when the specified key is not found on this object.
 java.lang.Object storedValueForKey(java.lang.String aKey)
          Returns the value for the private field that corresponds to the specified property.
 void takeStoredValueForKey(java.lang.Object aValue, java.lang.String aKey)
          Sets the the private field that corresponds to the specified property to the specified value.
 void takeValueForKey(java.lang.Object aValue, java.lang.String aKey)
          Sets the property to the specified value.
 void unableToSetNullForKey(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.
 java.lang.Object valueForKey(java.lang.String aKey)
          Returns the value for the specified property.
 

Method Detail

valueForKey

java.lang.Object valueForKey(java.lang.String aKey)
Returns the value for the specified property. If the property does not exist, this method should call handleQueryWithUnboundKey.

Specified by:
valueForKey in interface net.wotonomy.foundation.NSKeyValueCoding

takeValueForKey

void takeValueForKey(java.lang.Object aValue,
                     java.lang.String aKey)
Sets the property to the specified value. If the property does not exist, this method should call handleTakeValueForUnboundKey. If the property is of a type that cannot allow null (e.g. primitive types) and aValue is null, this method should call unableToSetNullForKey.

Specified by:
takeValueForKey in interface net.wotonomy.foundation.NSKeyValueCoding

storedValueForKey

java.lang.Object storedValueForKey(java.lang.String aKey)
Returns the value for the private field that corresponds to the specified property.

Specified by:
storedValueForKey in interface net.wotonomy.foundation.NSKeyValueCoding

takeStoredValueForKey

void takeStoredValueForKey(java.lang.Object aValue,
                           java.lang.String aKey)
Sets the the private field that corresponds to the specified property to the specified value.

Specified by:
takeStoredValueForKey in interface net.wotonomy.foundation.NSKeyValueCoding

handleQueryWithUnboundKey

java.lang.Object handleQueryWithUnboundKey(java.lang.String aKey)
Called by valueForKey when the specified key is not found on this object. Implementing classes should handle the specified value or otherwise throw an exception.

Specified by:
handleQueryWithUnboundKey in interface net.wotonomy.foundation.NSKeyValueCoding

handleTakeValueForUnboundKey

void handleTakeValueForUnboundKey(java.lang.Object aValue,
                                  java.lang.String aKey)
Called by takeValueForKey when the specified key is not found on this object. Implementing classes should handle the specified value or otherwise throw an exception.

Specified by:
handleTakeValueForUnboundKey in interface net.wotonomy.foundation.NSKeyValueCoding

unableToSetNullForKey

void unableToSetNullForKey(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. Implementing classes should handle this case appropriately or otherwise throw an exception.

Specified by:
unableToSetNullForKey in interface net.wotonomy.foundation.NSKeyValueCoding


Copyright © 2006 null. All Rights Reserved.