Class: Relationship
Defined in: | web-src/coffee/model/eer/relationship.coffee |
Inherits: | model.MyModel |
Overview
A Link between two classes or more classes.
This give support for two (using from() or to()) or more classes.
Instance Method Summary
- # (void) get_name()
- # (void) set_mult(mult) Set the multiplicity.
- # (void) set_class_mult(c, mult)
- # (void) set_attributes(attributes)
- # (void) add_class(c, m, r)
- # (void) add_attribute(a)
- # (void) set_roles(roles) Set the roles.
- # (void) set_class_role(roles)
- # (void) set_association_class(associationClass)
- # (void) change_to_null(mult, index)
- # (void) set_from(class_from) @param class_from an instance of Class.
- # (void) get_from()
- # (void) set_to(class_to)
- # (void) get_to()
- # (void) get_classes()
- # (void) is_two_linked() True if a two-linked relation.
- # (?) has_parent(parentclass) Implement in the subclass if necesary.
- # (void) hasSourceAndTarget(name, class_a, class_b)
- # (Boolean) is_associated(c) Is this link associated to the given class?
- # (void) to_json()
- # (void) create_joint(factory, csstheme = null)
- # (boolean) same_elts(other) Compare the relevant elements of these links.
Constructor Details
#
(void)
constructor(classes, name = null, position)
Instance Method Details
#
(void)
get_name()
#
(void)
set_mult(mult)
Set the multiplicity.
For example:
[null, null]
or ["0..*", "0..*"]
means from 0.. to 0...
[1..*, null]
means from 1.. to 0...
#
(void)
set_class_mult(c, mult)
#
(void)
set_attributes(attributes)
#
(void)
add_class(c, m, r)
#
(void)
add_attribute(a)
#
(void)
set_roles(roles)
Set the roles.
#
(void)
set_class_role(roles)
#
(void)
set_association_class(associationClass)
#
(void)
change_to_null(mult, index)
#
(void)
set_from(class_from)
@param class_from an instance of Class.
#
(void)
get_from()
#
(void)
set_to(class_to)
#
(void)
get_to()
#
(void)
get_classes()
#
(void)
is_two_linked()
True if a two-linked relation. False otherwise.
#
(?)
has_parent(parentclass)
Implement in the subclass if necesary.
#
(void)
hasSourceAndTarget(name, class_a, class_b)
#
(Boolean)
is_associated(c)
Is this link associated to the given class?
#
(void)
to_json()
#
(void)
create_joint(factory, csstheme = null)
#
(boolean)
same_elts(other)
Compare the relevant elements of these links.