Home | Trees | Index | Help |
|
---|
Package Modeling :: Package interfaces :: Module KeyValueCoding :: Class KeyValueCodingInterface |
|
Base
--+
|
KeyValueCodingInterface
DatabaseObjectInterface
,
RelationshipManipulationInterface
Mix-in class providing a common API to access or assign values to object's properties.
It defined three kinds of methods:
Method Summary | |
---|---|
Raises AttributeError. | |
Raises AttributeError. | |
Raises AttributeError. | |
DEPERECATED -- An alias for 'takeStoredValueForKey()' | |
DEPERECATED -- An alias for 'takeValueForKey()' | |
DEPERECATED -- An alias for 'takeValueForKey()' | |
order: _getKey(), _key(), key, _key, getKey(), key() Might be overriden to perform additional transformations before returning the object | |
order: _setKey(), _key, key, setKey() Might be overriden to perform additional transformations before returning the object | |
Invokes takeStoredValueForKey() for each key, value in the dictionary. | |
order: setKey(), _setKey(), key, _key Might be overriden to perform additional transformations before returning the object | |
| |
Invokes takeValueForKey() for each key, value in the dictionary. | |
order: getKey(), key(), _getKey(), _key(), key, _key Might be overriden to perform additional transformations before returning the object | |
Returns the list of values assigned to attributes specified in keys. |
Method Details |
---|
handleQueryWithUnboundKey(self, key)Raises AttributeError. Override this method if you want to make any appropriate processing when an key is not found ; overriding methods should 'raise AttributeError, key' if the custom process of getting the value for the specified key fails. |
handleTakeStoredValueForUnboundKey(self, value, key)Raises AttributeError. Override this method if you want to make any appropriate processing when an key appears not to be settable using 'takeStoredValueForKey()'; overriding methods should 'raise AttributeError, key' if the custom process of setting value for the specified key fails. |
handleTakeValueForUnboundKey(self, value, key)Raises AttributeError. Override this method if you want to make any appropriate processing when an key appears not to be settable using 'takeValueForKey()'; overriding methods should 'raise AttributeError, key' if the custom process of setting value for the specified key fails. |
setStoredValueForKey(self, value, key)DEPERECATED -- An alias for 'takeStoredValueForKey()' |
setValueForKey(self, value, key)DEPERECATED -- An alias for 'takeValueForKey()' |
setValueForKeyPath(self, value, keypath)DEPERECATED -- An alias for 'takeValueForKey()' |
storedValueForKey(self, key)order: _getKey(), _key(), key, _key, getKey(), key() Might be overriden to perform additional transformations before returning the object |
takeStoredValueForKey(self, value, key)order: _setKey(), _key, key, setKey() Might be overriden to perform additional transformations before returning the object Might call 'handleTakeStoredValueForUnboundKey()'... |
takeStoredValuesFromDictionary(self, dictionary)Invokes takeStoredValueForKey() for each key, value in the dictionary. Example: object.takeStoredValueForKey({'attr1': 'value1','attr2': 'value2'}) |
takeValueForKey(self, value, key)order: setKey(), _setKey(), key, _key Might be overriden to perform additional transformations before returning the object Might call 'handleTakeValueForUnboundKey()'... |
takeValueForKeyPath(self, value, key) |
takeValuesFromDictionary(self, dictionary)Invokes takeValueForKey() for each key, value in the dictionary. Example: object.takeValueForKey({'attr1': 'value1','attr2': 'value2'}) |
valueForKey(self, key)order: getKey(), key(), _getKey(), _key(), key, _key Might be overriden to perform additional transformations before returning the object |
valuesForKeys(self, keys)Returns the list of values assigned to attributes specified in keys. This method uses valueForKey() Example: >>> [o.valuesForKeys(('firstName', 'lastName')) ... for o in ec.fetch('Employee', isDeep=1)] [['Jeanne', 'Cleese'], ['John Jr.', 'Cleese'], ['John', 'Cleese']] |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Mar 4 13:36:22 2006 | http://epydoc.sf.net |