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

Class DatabaseObjectInterface

                         Base --+    
                                |    
                FaultingInterface --+
                                    |
                         Base --+   |
                                |   |
          KeyValueCodingInterface --+
                                    |
                     Base --+       |
                            |       |
      KeyValueCodingInterface --+   |
                                |   |
RelationshipManipulationInterface --+
                                    |
                         Base --+   |
                                |   |
              ValidationInterface --+
                                    |
                                   DatabaseObjectInterface


Method Summary
  allPropertyKeys(self)
attributesKeys + toOne/toManyRelationshipKeys
  attributeKeys(self)
See ClassDescription
  awakeFromFetch(self, anEditingContext)
'EditingContext' sends this message to every object fetched and registered in it.
  awakeFromInsertion(self, anEditingContext)
'EditingContext' sends this message to every object inserted in it.
  classDescription(self)
Returns the ClassDescription assigned to the receiver
  classDescriptionForDestinationKey(self, aKey)
Returns the ClassDescription assigned to the receiver
  clearProperties(self)
Clears all of the object's properties.
  deleteRuleForRelationshipKey(self, aKey)
See ClassDescription
  editingContext(self)
  entityName(self)
Returns the corresponding entity's name.
  inverseForRelationshipKey(self, aKey)
Returns the name of the relationship pointing back to current entity, or None if it does not exists.
  isToManyKey(self, aKey)
Tells whether the receiver's classDescription has a toMany relationship 'aKey'
  propagateDeleteWithEditingContext(self, editingContext)
XXXX
  snapshot(self)
Returns a snapshot for the current object...
  toManyRelationshipKeys(self)
See ClassDescription
  toOneRelationshipKeys(self)
See ClassDescription
  updateFromSnapshot(aSnapshotDictionary)
Updates the values from the supplied snapshot
  willChange(self)
XXXXX
    Inherited from FaultingInterface
  clearFault(self)
Invoked after the fault has been fired: it clears the fault status, and has a consequence release its handler.
  faultHandler(self)
Return the FaultHandler which is used when the object needs to be fully initialized.
  isFault(self)
Tells whether the receiver is a fault or not
  turnIntoFault(self, faultHandler)
Turns the receiver into a fault.
  willRead(self)
Triggers the fault and complete the initialization of the object.
    Inherited from RelationshipManipulationInterface
  addObjectToBothSidesOfRelationshipWithKey(self, anObject, aKey)
Adds object to the corresponding relationship, and adds 'self' to 'anObject' 's inverse relationship, if it exists.
  addObjectToPropertyWithKey(self, anObject, aKey)
Depending on the relationship, the method performs the foowing steps:
  removeObjectFromBothSidesOfRelationshipWithKey(self, anObject, aKey)
Simply returns if anObject is None ('n issues a log at warning level)
  removeObjectFromPropertyWithKey(self, anObject, aKey)
Depending on the relationship, the method performs the following steps:
    Inherited from KeyValueCodingInterface
  handleQueryWithUnboundKey(self, key)
Raises AttributeError.
  handleTakeStoredValueForUnboundKey(self, value, key)
Raises AttributeError.
  handleTakeValueForUnboundKey(self, value, key)
Raises AttributeError.
  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
  takeStoredValuesFromDictionary(self, dictionary)
Invokes takeStoredValueForKey() for each key, value in the dictionary.
  takeValueForKey(self, value, key)
order: setKey(), _setKey(), key, _key Might be overriden to perform additional transformations before returning the object
  takeValueForKeyPath(self, value, key)
  takeValuesFromDictionary(self, dictionary)
Invokes takeValueForKey() for each key, value in the dictionary.
  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.
    Inherited from ValidationInterface
  validateForDelete(self)
Only checks for now that no relationship tagged with 'DENY' still holds objects
  validateForInsert(self)
Simply calls validateForSave for now
  validateForSave(self)
Validates the whole object + calls subclass' validate<attribute/relationshipName>() method if available.
  validateForUpdate(self)
Simply calls validateForSave for now
  validateObject(self)
Kept for backward compatibility ; should simply call 'validateForSave()'
  validateValueForKey(self, aValue, aKey)
Validate the value hold by 'aKey' attribute/relationship in the object

Method Details

allPropertyKeys(self)

attributesKeys + toOne/toManyRelationshipKeys

attributeKeys(self)

See ClassDescription

awakeFromFetch(self, anEditingContext)

'EditingContext' sends this message to every object fetched and registered in it. See 'EditingContext.objectsWithFetchSpecification()'

'CustomObject' 's implementation calls 'awakeObjectFromFetch()' on the underlying 'ClassDescription'.

Override this method if you want to make additional initialization after an object has been fetched and registered within an 'EditingContext'. In that case, it is your responsability to make sure that 'CustomObject' 's method is called before proceeding.

awakeFromInsertion(self, anEditingContext)

'EditingContext' sends this message to every object inserted in it. See 'EditingContext.insertObject()' and 'EditingContext.insertObjectWithGlobalID()'

'CustomObject' 's implementation calls 'awakeObjectFromInsertion()' on the underlying 'ClassDescription'.

Override this method if you want to make additional initialization after an object has been inserted into an 'EditingContext'. In that case, it is your responsability to make sure that 'CustomObject' 's method is called before proceeding.

classDescription(self)

Returns the ClassDescription assigned to the receiver
Overrides:
Modeling.interfaces.RelationshipManipulation.RelationshipManipulationInterface.classDescription

classDescriptionForDestinationKey(self, aKey)

Returns the ClassDescription assigned to the receiver

clearProperties(self)

Clears all of the object's properties.

This is used to break circular reference / for garbage collection 'n co, e.g. when an EditingContext is finalized and about to be garbage-collected

See also: EditingContext.invalidatesObjectsWhenFinalized() for details

deleteRuleForRelationshipKey(self, aKey)

See ClassDescription

entityName(self)

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

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.

isToManyKey(self, aKey)

Tells whether the receiver's classDescription has a toMany relationship 'aKey'

propagateDeleteWithEditingContext(self, editingContext)

XXXX

snapshot(self)

Returns a snapshot for the current object... ... NullValue vs. None ... Returned value: dictionary

toManyRelationshipKeys(self)

See ClassDescription

toOneRelationshipKeys(self)

See ClassDescription

updateFromSnapshot(aSnapshotDictionary)

Updates the values from the supplied snapshot

willChange(self)

XXXXX

Transparently calls 'willRead'


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