Package Modeling :: Module DatabaseObject :: Class DatabaseObject
[show private | hide private]
[frames | no frames]

Class DatabaseObject

KeyValueCoding --+
                 |
                DatabaseObject

Known Subclasses:
CustomObject

--
Method Summary
  attributeNameForKey(self, key)
Returns the name of the attribute corresponding to the 'key', i.e.
  classAttributeNameForKey(self, key)
Returns the name of the object's class attribute corresponding to the 'key', i.e.
  classDescription(self)
Returns the ClassDescription assigned to the receiver
  clearFault(self)
Conformance to the Faulting interface.
  clearProperties(self)
See interfaces.DatabaseObject for details
  entityName(self)
Returns the corresponding entity's name.
  faultHandler(self)
Conformance to the Faulting interface.
  inverseForRelationshipKey(self, aKey)
Returns the name of the relationship pointing back to current entity, or None if it does not exists.
  isFault(self)
Conformance to the Faulting interface.
  prepareForInitializationWithKeys(self, keys)
Creates in 'self' the list of attributes specified by keys, if they do not already exists.
  turnIntoFault(self, aFaultHandler)
Conformance to the Faulting interface.
  willRead(self)
Conformance to the Faulting interface.
    Inherited from KeyValueCoding
  handleAssignementForUnboundKey(self, value, key)
See interfaces.KeyValueCoding for details
  handleQueryWithUnboundKey(self, key)
See interfaces.KeyValueCoding for details
  setStoredValueForKey(self, value, key)
DEPRECATED -- alias for 'takeStoredValueForKey()'
  setValueForKey(self, value, key)
DEPRECATED -- alias for takeValueForKey()
  setValueForKeyPath(self, value, keypath)
DEPRECATED -- alias for takeValueForKeyPath()
  storedValueForKey(self, key)
See interfaces.KeyValueCoding for details
  takeStoredValueForKey(self, value, key)
See interfaces.KeyValueCoding for details
  takeStoredValuesFromDictionary(self, dictionary)
See interfaces.KeyValueCoding for details
  takeValueForKey(self, value, key)
See interfaces.KeyValueCoding for details
  takeValueForKeyPath(self, value, key)
See interfaces.KeyValueCoding for details
  takeValuesFromDictionary(self, dictionary)
See interfaces.KeyValueCoding for details
  valueForKey(self, key)
See interfaces.KeyValueCoding for details
  valueForKeyPath(self, keypath)
See interfaces.KeyValueCoding for details
  valuesForKeys(self, keys)
See interfaces.KeyValueCoding for details

Class Variable Summary
tuple __implements__ = (<class Modeling.interfaces.Relationshi...

Method Details

attributeNameForKey(self, key)

Returns the name of the attribute corresponding to the 'key', i.e. either '_key' or 'key', or 'None' if the object does not have such an attribute. When both attributes exists, returned value is '_key'

This is part of the support for the KeyValueCoding.

See also: prepareForInitializationWithKeys()

classAttributeNameForKey(self, key)

Returns the name of the object's class attribute corresponding to the 'key', i.e. either '_key' or 'key', or 'None' if the object's class does not have such an attribute. When both attributes exists, returned value is '_key'

This is part of the support for the KeyValueCoding.

See also: prepareForInitializationWithKeys()

classDescription(self)

Returns the ClassDescription assigned to the receiver

clearFault(self)

Conformance to the Faulting interface. See this interface documentation for details

clearProperties(self)

See interfaces.DatabaseObject for details

entityName(self)

Returns the corresponding entity's name. Note that derived objects must override this. As a reminder this method raises 'MethodShouldBeOverridden'

faultHandler(self)

Conformance to the Faulting interface. See this interface documentation for details

inverseForRelationshipKey(self, aKey)

Returns the name of the relationship pointing back to current entity, or None if it does not exists.

Note: can be overriden in subclasses if the default behaviour would not
return the correct answer.

isFault(self)

Conformance to the Faulting interface. See this interface documentation for details

prepareForInitializationWithKeys(self, keys)

Creates in 'self' the list of attributes specified by keys, if they do not already exists.

You should not need to call this method directly, it is automatically called when an object is about to be initialized with values fetched from a database (or when a fault is fired).

This is part of the support for the KeyValueCoding.

The algorithm used is the following, for a given key in 'keys'

  • if 'self' already has an attribute 'key' or '_key', it does nothing
  • if 'self' 's class declares an attribute='key' or '_key', that attribute is created in 'self' and initialized to 'None',
  • if neither 'self' nor its class declares such an attribute, an attribute '_key' is created and initialized to 'None'
See also: 'attributeNameForKey()', 'classAttributeNameForKey()',
KeyValueCoding and the related documentation.

turnIntoFault(self, aFaultHandler)

Conformance to the Faulting interface. See this interface documentation for details

willRead(self)

Conformance to the Faulting interface. See this interface documentation for details

Class Variable Details

__implements__

Type:
tuple
Value:
(<class Modeling.interfaces.RelationshipManipulation.RelationshipManip\
ulationInterface at 0xb79176bc>,
 <class Modeling.interfaces.KeyValueCoding.KeyValueCodingInterface at \
0xb791768c>,
 <class Modeling.interfaces.Faulting.FaultingInterface at 0xb791795c>) 

Generated by Epydoc 2.1 on Sat Mar 4 13:36:27 2006 http://epydoc.sf.net