Home | Trees | Index | Help |
|
---|
Package Modeling :: Module Relationship :: Class SimpleRelationship |
|
KeyValueCoding
--+ |object
--+ |XMLCapability
--+ |Relationship
--+ | SimpleRelationship
Describes a relationship
Features added to the EOF standard API:
- cardinality of the relationship
Method Summary | |
---|---|
Initializes a relationship. | |
Tests whether both relationship are equal | |
Returns a short representation of the relationship | |
See interfaces.Relationship for details | |
If self.inverseRelationship() exists, return that one, otherwise build and return an inverse relationship for self | |
Checks the relationship validity. | |
Returns a copy of the current Relationship | |
See interfaces.Relationship for details | |
See interfaces.Relationship for details | |
Returns the corresponding destination Attribute for 'attribute', i.e. | |
Simply returns the list of joins' destination attributes | |
Returns the destination entity, or 'None' if the relationship has no joins yet | |
Return the destination entity, or None | |
Returns the (DOM) DocumentObject for the receiver. | |
Returns string "relation". | |
See interfaces.KeyValueCoding for details | |
See interfaces.KeyValueCoding for details | |
Initializes a relationship with the supplied xml.dom.node. | |
Returns the inverse relationship in the destination entity, or None if it does not exist | |
Simply indicates whether the relationship has one or more joins Returns true iff relationship has one join, false otherwise. | |
See interfaces.Relationship for details | |
Indicates whether the relation holds one join. | |
Return the whole set of joins registered in this relationship | |
Returns the join semantic to be used for the relationship's joins | |
Returns true if the relationship owns the destinationEntity. | |
Returns true if the relationship propagates PK value, false otherwise _TBD should be explained | |
| |
Removes the supplied join from the relation's join. | |
See interfaces.Relationship for details | |
Sets the join semantic for the underlying joins. | |
Tells the receiver whether it owns its destination objects. | |
Tells the relationship whether it propagates PK value _TBD should be explained | |
Simply returns the list of joins' source attributes | |
Validates the relationship against general model consistency: - relationship should have a source and a destination entity - | |
Checks whether the supplied value is valid, i.e. | |
. | |
Inherited from Relationship | |
| |
Sets the source entity | |
Returns the comment field | |
Returns the delete rule applicable to this relationship. | |
Returns the display label for the relationship | |
Return the relationship's source entity | |
Indicates whether the attribute belongs to the class properties/fields | |
Indicates whether the relationship requires at least a destination entity to be bound. | |
negation of isClassProperty | |
Indicates whether the relationship has a maximum cardinality > 1. | |
Indicates whether the relationship has a maximim cardinality = 1. | |
Returns the lower bound of the relationship's multiplicity | |
Returns the upper bound of the relationship's multiplicity. | |
Returns the relationship's name | |
Sets the comment field | |
Sets the delete rule. | |
Sets the display label (string) for the relationship | |
Sets the source entity | |
Tells the receiver whether it belongs to the class properties/fields | |
Tells the relationship whether it is mandatory. | |
Sets the lower and upper bounds for the relationship's multiplicity. | |
Sets the lower bound of the relationship's multiplicity Parameter lowerBound must be an positive integer. | |
Sets the upper bound of the relationship's multiplicity. | |
Sets the relationship's name | |
Return the relationship's source entity | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
Inherited from XMLCapability | |
| |
| |
| |
Inherited from KeyValueCoding | |
See interfaces.KeyValueCoding for details | |
DEPRECATED -- alias for 'takeStoredValueForKey()' | |
DEPRECATED -- alias for takeValueForKey() | |
DEPRECATED -- alias for takeValueForKeyPath() | |
See interfaces.KeyValueCoding for details | |
See interfaces.KeyValueCoding for details | |
See interfaces.KeyValueCoding for details | |
See interfaces.KeyValueCoding for details | |
See interfaces.KeyValueCoding for details | |
See interfaces.KeyValueCoding for details | |
See interfaces.KeyValueCoding for details | |
See interfaces.KeyValueCoding for details | |
See interfaces.KeyValueCoding for details |
Class Variable Summary | |
---|---|
tuple |
__implements__ = (<class Modeling.interfaces.Relationshi...
|
Method Details |
---|
__init__(self,
aName='')
|
__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 |
anyInverseRelationship(self)If self.inverseRelationship() exists, return that one, otherwise build and return an inverse relationship for self See also: inverseRelationship() |
checkRelationshipValidity(self)Checks the relationship validity. This includes the following tests: - cardinality > 0 - len(joins) > 0 - name - source and destinationEntity are not None - joins' sources are identical (idem for destinations) Raises the relation is invalid. |
clone(self, entity, name=None)Returns a copy of the current Relationship Parameter:
See also: Entity.clone() |
componentRelationships(self)See interfaces.Relationship for details |
definition(self)See interfaces.Relationship for details |
destinationAttributeForSourceAttribute(self, attribute)Returns the corresponding destination Attribute for 'attribute', i.e. the destinationAttribute of the relationship's join which has 'attribute' as the source attribute. Raises ValueError if 'attribute' is not a source attribute of any join defined in the Relationship. |
destinationAttributes(self)Simply returns the list of joins' destination attributes |
destinationEntity(self)Returns the destination entity, or 'None' if the relationship has no joins yet |
destinationEntityName(self)Return the destination entity, or None |
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.
|
getXMLNodeName(self)Returns string "relation". See interfaces.XMLCapability for details |
handleAssignementForUnboundKey(self, value, key)See interfaces.KeyValueCoding for details
|
handleTakeStoredValueForUnboundKey(self, value, key)See interfaces.KeyValueCoding for details
|
initWithXMLDOMNode(self, aNode, encoding='iso-8859-1')Initializes a relationship with the supplied xml.dom.node. |
inverseRelationship(self)Returns the inverse relationship in the destination entity, or None if it does not exist Note: the inverseRelationship() is not idempotent, i.e. rel.inverseRelationship().inverseRelationship() does not necessarily returns self. It returns self if and only if the relationship's entity has no parent entity, or if the relationship is not an inherited property (none of the parent entities defines the relationship). See also: anyInverseRelationship() |
isCompound(self)Simply indicates whether the relationship has one or more joins Returns true iff relationship has one join, false otherwise. Raises if relationship has no joins. |
isFlattened(self)See interfaces.Relationship for details |
isSimple(self)Indicates whether the relation holds one join. Note that this method return also 'true' when the relationship is invalid (i.e. it holds no joins) |
joins(self)Return the whole set of joins registered in this relationship |
joinSemantic(self)Returns the join semantic to be used for the relationship's joins Return value is one of the module's constant INNER_JOIN, FULL_OUTER_JOIN, RIGHT_OUTER_JOIN, LEFT_OUTER_JOIN |
ownsDestination(self)Returns true if the relationship owns the destinationEntity. See also: setOwnsDestination() When a relationship owns its destination, the related entity object cannot exist without the source object. Thus, as a side-effect, this sets the delete rule to 'cascade'. |
propagatesPrimaryKey(self)Returns true if the relationship propagates PK value, false otherwise _TBD should be explained |
raiseUnappropriate(self) |
removeJoin(self, aJoin)Removes the supplied join from the relation's join. Parameter 'aJoin' must be a 'Join' instance. Raises 'ValueError' if 'aJoin' cannot be found. |
setDefinition(self, definition)See interfaces.Relationship for details |
setJoinSemantic(self, semantic)Sets the join semantic for the underlying joins. Parameter:
|
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)Simply returns the list of joins' source attributes |
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:
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). |
Class Variable Details |
---|
__implements__
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Mar 4 13:36:21 2006 | http://epydoc.sf.net |