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

Type FlattenedRelationship

KeyValueCoding --+    
                 |    
        object --+    
                 |    
 XMLCapability --+    
                 |    
      Relationship --+
                     |
                    FlattenedRelationship


See interfaces.Relationship for details
Method Summary
  __init__(self, aName)
Initializes a flattened relationship.
  __eq__(self, aRelationship)
Tests whether both relationship are equal
  __str__(self)
Returns a short representation of the relationship
  addJoin(self, aJoin)
See interfaces.Relationship for details
  checkRelationshipValidity(self)
Not Implemented Checks the relationship validity.
  componentRelationships(self)
See interfaces.Relationship for details
  definition(self)
See interfaces.Relationship for details
  destinationAttributes(self)
Unimplemented
  destinationEntity(self)
Returns the destination entity, or 'None' if the relationship has no definition yet
  destinationEntityName(self)
Return the destination entity, or None
  getXMLDOM(self, doc, parentNode, encoding)
  getXMLNodeName(self)
Returns string "flattenedRelation".
  inverseRelationship(self)
Returns the inverse relationship in the destination entity, or None if it does not exist
  isCompound(self)
  isFlattened(self)
See interfaces.Relationship for details
  isMandatory(self)
Indicates whether the relationship requires at least a destination entity to be bound.
  isSimple(self)
Unappropriate
  isToMany(self)
Indicates whether the relationship has a maximum cardinality > 1.
  isToOne(self)
Indicates whether the relationship has a maximim cardinality = 1.
  joins(self)
Unappropriate for flattened relationship
  ownsDestination(self)
Unappropriate
  propagatesPrimaryKey(self)
Returns true if the relationship propagates PK value, false otherwise _TBD should be explained
  raiseUnappropriate(self)
  removeJoin(self, aJoin)
  setDefinition(self, definition)
See interfaces.Relationship for details
  setOwnsDestination(self, boolean)
Tells the receiver whether it owns its destination objects.
  setPropagatesPrimaryKey(self, aBool)
Tells the relationship whether it propagates PK value _TBD should be explained
  sourceAttributes(self)
Unimplemented
  validateRelationship(self)
Validates the relationship against general model consistency: - relationship should have a source and a destination entity -
  validateValue(self, value, object)
Checks whether the supplied value is valid, i.e.
  xmlAttributesDict(self)
    Inherited from Relationship
  __ne__(self, aRelationship)
  _setSourceEntity(self, anEntity)
Sets the source entity
  comment(self)
Returns the comment field
  deleteRule(self)
Returns the delete rule applicable to this relationship.
  displayLabel(self)
Returns the display label for the relationship
  entity(self)
Return the relationship's source entity
  initWithXMLDOMNode(self, aNode, encoding)
Initializes a relationship with the supplied xml.dom.node.
  isClassProperty(self)
Indicates whether the attribute belongs to the class properties/fields
  isNotClassProperty(self)
negation of isClassProperty
  multiplicityLowerBound(self)
Returns the lower bound of the relationship's multiplicity
  multiplicityUpperBound(self)
Returns the upper bound of the relationship's multiplicity.
  name(self)
Returns the relationship's name
  setComment(self, aComment)
Sets the comment field
  setDeleteRule(self, rule)
Sets the delete rule.
  setDisplayLabel(self, aLabel)
Sets the display label (string) for the relationship
  setEntity(self, anEntity)
Sets the source entity
  setIsClassProperty(self, aBool)
Tells the receiver whether it belongs to the class properties/fields
  setIsMandatory(self, aBool)
Tells the relationship whether it is mandatory.
  setMultiplicity(self, lowerBound, upperBound)
Sets the lower and upper bounds for the relationship's multiplicity.
  setMultiplicityLowerBound(self, lowerBound)
Sets the lower bound of the relationship's multiplicity Parameter lowerBound must be an positive integer.
  setMultiplicityUpperBound(self, upperBound)
Sets the upper bound of the relationship's multiplicity.
  setName(self, aName)
Sets the relationship's name
  sourceEntity(self)
Return the relationship's source entity
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
    Inherited from XMLCapability
  xmlAttributeType(self, attributeName)
  xmlGetAttribute(self, attributeName)
  xmlSetAttribute(self, attributeName)
    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
    Inherited from Relationship
tuple __implements__ = (<class Modeling.interfaces.Relationshi...

Method Details

__init__(self, aName='')
(Constructor)

Initializes a flattened relationship. A name must be provided.
Overrides:
Modeling.Relationship.Relationship.__init__

__eq__(self, aRelationship)
(Equality operator)

Tests whether both relationship are equal

__str__(self)
(Informal representation operator)

Returns a short representation of the relationship
Overrides:
__builtin__.object.__str__

addJoin(self, aJoin)

See interfaces.Relationship for details

checkRelationshipValidity(self)

Not Implemented Checks the relationship validity. This includes the following tests: - cardinality > 0 - definition is set - name - source and destinationEntity are not None Raises the relation is invalid.

componentRelationships(self)

See interfaces.Relationship for details

definition(self)

See interfaces.Relationship for details

destinationAttributes(self)

Unimplemented

destinationEntity(self)

Returns the destination entity, or 'None' if the relationship has no definition yet

destinationEntityName(self)

Return the destination entity, or None

getXMLDOM(self, doc=None, parentNode=None, encoding='iso-8859-1')

Overrides:
Modeling.Relationship.Relationship.getXMLDOM

getXMLNodeName(self)

Returns string "flattenedRelation". See interfaces.XMLCapability for details
Overrides:
Modeling.Relationship.Relationship.getXMLNodeName

inverseRelationship(self)

Returns the inverse relationship in the destination entity, or None if it does not exist

isCompound(self)

isFlattened(self)

See interfaces.Relationship for details

isMandatory(self)

Indicates whether the relationship requires at least a destination entity to be bound. This is a computed attribute, equivalent to: 'self.multiplicityLowerBound()>0'.
Overrides:
Modeling.Relationship.Relationship.isMandatory

isSimple(self)

Unappropriate

isToMany(self)

Indicates whether the relationship has a maximum cardinality > 1. This is the contrary of method isToOne.
Overrides:
Modeling.Relationship.Relationship.isToMany

isToOne(self)

Indicates whether the relationship has a maximim cardinality = 1. This is the contrary of method isToMany.
Overrides:
Modeling.Relationship.Relationship.isToOne

joins(self)

Unappropriate for flattened relationship

ownsDestination(self)

Unappropriate

propagatesPrimaryKey(self)

Returns true if the relationship propagates PK value, false otherwise _TBD should be explained

raiseUnappropriate(self)

removeJoin(self, aJoin)

setDefinition(self, definition)

See interfaces.Relationship for details

setOwnsDestination(self, boolean)

Tells the receiver whether it owns its destination objects.

When a relationship owns its destination, the related object(s) cannot exist without the source object.

setPropagatesPrimaryKey(self, aBool)

Tells the relationship whether it propagates PK value _TBD should be explained

sourceAttributes(self)

Unimplemented

validateRelationship(self)

Validates the relationship against general model consistency: - relationship should have a source and a destination entity -

validateValue(self, value, object=None)

Checks whether the supplied value is valid, i.e. the following tests are made:

  1. value cannot be void (None or an empty list) if the relationship is mandatory
  2. 'value' matches the multiplicity bounds
  3. Value's entity is the relationship's destination entity (same for 'value' 's items if 'value' is a tuple)

Parameter 'value' is required, and 'object' is optional --it is only used to make the error message clearer in case of failure.

Silently returns if it succeeds.

In case of failure, it raises 'Modeling.Validation.ValidationException' ; in this case, exception's value ('sys.exc_info[1]') consists in a set of lines, describing line per line the different tests which failed.

xmlAttributesDict(self)

Overrides:
Modeling.Relationship.Relationship.xmlAttributesDict

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