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

Type Relationship

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

Known Subclasses:
FlattenedRelationship, SimpleRelationship

See interfaces.Relationship for detail
Method Summary
  __init__(self, aName)
  __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
  getXMLDOM(self, doc, parentNode, encoding)
Returns the (DOM) DocumentObject for the receiver.
  getXMLNodeName(self)
See interfaces.XMLCapability for details
  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
  isMandatory(self)
Indicates whether the relationship requires at least a destination entity to be bound.
  isNotClassProperty(self)
negation of isClassProperty
  isToMany(self)
Indicates whether the relationship has a maximum cardinality > 1.
  isToOne(self)
Indicates whether the relationship has a maximim cardinality = 1.
  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
  xmlAttributesDict(self)
    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
  __str__(x)
x.__str__() <==> str(x)
    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
tuple __implements__ = (<class Modeling.interfaces.Relationshi...
str _comment = ''
int _isClassProperty = 1                                                                     

Method Details

_setSourceEntity(self, anEntity)

Sets the source entity

comment(self)

Returns the comment field

deleteRule(self)

Returns the delete rule applicable to this relationship. Possible values are module's integer constants DELETE_CASCADE, DELETE_NULLIFY and DELETE_DENY

displayLabel(self)

Returns the display label for the relationship

entity(self)

Return the relationship's source entity

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

Returns the (DOM) DocumentObject for the receiver.

Parameters 'doc' and 'parentDoc' should be both omitted or supplied. If they are omitted, a new DocumentObject is created. If they are supplied, elements are added to the parentNode.

Returns: the (possibly new) DocumentObject.

Overrides:
Modeling.XMLutils.XMLCapability.getXMLDOM

getXMLNodeName(self)

See interfaces.XMLCapability for details
Overrides:
Modeling.XMLutils.XMLCapability.getXMLNodeName

initWithXMLDOMNode(self, aNode, encoding='iso-8859-1')

Initializes a relationship with the supplied xml.dom.node.

isClassProperty(self)

Indicates whether the attribute belongs to the class properties/fields

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'.

isNotClassProperty(self)

negation of isClassProperty

isToMany(self)

Indicates whether the relationship has a maximum cardinality > 1. This is the contrary of method isToOne.

isToOne(self)

Indicates whether the relationship has a maximim cardinality = 1. This is the contrary of method isToMany.

multiplicityLowerBound(self)

Returns the lower bound of the relationship's multiplicity

multiplicityUpperBound(self)

Returns the upper bound of the relationship's multiplicity. Returned value is a strictly positive integer, or -1 if there is no upper bound.

name(self)

Returns the relationship's name

setComment(self, aComment)

Sets the comment field

setDeleteRule(self, rule)

Sets the delete rule. Accepted values are module's constants: DELETE_NULLIFY, DELETE_CASCADE and DELETE_DENY

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. This method has the following side-effects: if set to 'true' and the multiplicity lower bound was '0' (zero) it is set to '1' (one) ; if set to 'false', the multiplicity lower bound is set to 'zero'.

setMultiplicity(self, lowerBound, upperBound)

Sets the lower and upper bounds for the relationship's multiplicity. See also: setMultiplicityLowerBound, setMultiplicityUpperBound.

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.

Parameter:

upperBound -- must be a strictly positive integer, or -1 for a non
constrained to-many relationship. Special values '*' and None are equivalent to -1.

setName(self, aName)

Sets the relationship's name

sourceEntity(self)

Return the relationship's source entity

xmlAttributesDict(self)

Overrides:
Modeling.XMLutils.XMLCapability.xmlAttributesDict

Class Variable Details

__implements__

Type:
tuple
Value:
(<class Modeling.interfaces.Relationship.RelationshipInterface at 0xb7\
612e0c>,
 <class Modeling.interfaces.XMLCapability.XMLCapabilityInterface at 0x\
b7612e9c>)                                                             

_comment

Type:
str
Value:
''                                                                     

_isClassProperty

Type:
int
Value:
1                                                                     

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