Interface IRelationDefinition

All Superinterfaces:
Serializable
All Known Implementing Classes:
RelationDefinition

public interface IRelationDefinition extends Serializable
This interface contains various methods that can be used to retrieve information about a relation.
Since:
5.0
Author:
O. Kerpershoek, F. v.d. Meer
  • Method Summary

    Modifier and Type
    Method
    Description
    This method returns the name of the attribute that refers back to the referrer.
    This method return the name of the entity this relation is referring to.
    This method returns the explain text of the relation, as defined in Studio.
    This method returns the question text of the relation, as defined in Studio.
    This method returns the type of the relation.
    boolean
    This method returns a boolean indicating this attribute is a reverse relation attribute as defined in studio.
    boolean
    This method can be used to determine if the object that this relation is referring to is owned by the object referring it.
  • Method Details

    • getType

      RelationType getType()
      This method returns the type of the relation. The most important type at this moment (as it is the only one that can be modeled) is the associative relation type. Please refer to the RelationType for more information about the various supported types.
      Returns:
      RelationType denoting the type of the relation.
    • referrerIsOwner

      boolean referrerIsOwner()
      This method can be used to determine if the object that this relation is referring to is owned by the object referring it. This method is only relevant with relations that have a directed (parent-child) relation type. With a directed relation, one of the objects is considered the owner (parent).
      Returns:
      boolean
    • getEntityName

      String getEntityName()
      This method return the name of the entity this relation is referring to.
      Returns:
      String containing the name of the entity that this relation refers to.
    • getAttribute

      String getAttribute()

      This method returns the name of the attribute that refers back to the referrer. The attribute referring back may be empty for relations that are specified in only a single direction.

      For example: A person might have a relation defined to a car, where as the car might have the reverse relation though the attribute owner. For the relation defined in person, this getAttribute method will return the attribute referring back to the person (the owner attribute). The relation definition of the car will return the attribute car from person, as that attribute refers back to the car.

      Returns:
      String name of the attribute that refers back to the object containing this relation.
    • isReverseAttribute

      boolean isReverseAttribute()
      This method returns a boolean indicating this attribute is a reverse relation attribute as defined in studio. This method is not (yet) deprecated: This method should not be needed when composite relations are defined in studio.
      Returns:
      A boolean indicating this attribute is a reverse relation attribute.
    • getQuestionText

      IMultilingualText getQuestionText()
      This method returns the question text of the relation, as defined in Studio.
      Returns:
      An IMultilingualText containing the relation question text, as defined in Studio.
    • getExplainText

      IMultilingualText getExplainText()
      This method returns the explain text of the relation, as defined in Studio.
      Returns:
      An IMultilingualText containing the relation explain text, as defined in Studio.