Class RelationType

java.lang.Object
com.aquima.interactions.metamodel.RelationType
All Implemented Interfaces:
Serializable

public class RelationType extends Object implements Serializable
This class is used as an enumerated type for the possible types of relations.
Since:
5.0
Author:
O. Kerpershoek, F. v.d. Meer
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final RelationType
    This relation type implies a parent-child relation (part-of relation) between to objects.
    static final RelationType
    This relation type is generic.
    static final RelationType
    A composite relation is a specific kind of aggregation, as the child object of the relation cannot exist without the parent.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    RelationType(String name, boolean directed, boolean exclusive)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    This method returns the name of the relation type.
    int
     
    boolean
    This method returns a boolean indicating if the relation type represents a parent-child relation.
    boolean
    This method returns a boolean indicating if the child object a directed relation belongs exclusively to the parent.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ASSOCIATIVE

      public static final RelationType ASSOCIATIVE
      This relation type is generic. Two objects related with an associative relation are considered equal to each other, and can exist independently.
    • AGGREGATE

      public static final RelationType AGGREGATE
      This relation type implies a parent-child relation (part-of relation) between to objects. Objects that are related to each other by aggregation may exist independent of each other.
    • COMPOSITE

      public static final RelationType COMPOSITE
      A composite relation is a specific kind of aggregation, as the child object of the relation cannot exist without the parent.
  • Constructor Details

    • RelationType

      protected RelationType(String name, boolean directed, boolean exclusive)
  • Method Details

    • valueOf

      public static RelationType valueOf(String name)
    • getType

      public String getType()
      This method returns the name of the relation type.
      Returns:
      String containing the name of the relation type.
    • isDirected

      public boolean isDirected()
      This method returns a boolean indicating if the relation type represents a parent-child relation.
      Returns:
      boolean indicating if the relation type represents a parent-child relation.
    • isExclusive

      public boolean isExclusive()
      This method returns a boolean indicating if the child object a directed relation belongs exclusively to the parent.
      Returns:
      boolean indicating if the child object a directed relation belongs exclusively to the parent.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object