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

Constructor Details

# (void) constructor(classes, name = null, position)

Parameters:

  • classes ( Array<Class> ) An array of Class objects, the first class is the "from" and the second is the "to" class in a two-linked relation.

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

Parameters:

  • mult ( array ) An array that describes the multiplicity in strings.

# (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.

Parameters:

  • roles ( array ) An array of strings.

# (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.

Parameters:

  • parentclass ( Class ) The Class instance to check.

Returns:

  • ( ? ) — true if this is a generalization class and has the given parent instance. false otherwise.

# (void) hasSourceAndTarget(name, class_a, class_b)

# (Boolean) is_associated(c)

Is this link associated to the given class?

Parameters:

  • c ( Class instance ) The class to test with.

Returns:

  • Boolean

# (void) to_json()

# (void) create_joint(factory, csstheme = null)

# (boolean) same_elts(other)

Compare the relevant elements of these links.

Parameters:

Returns:

  • boolean

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: