Interface SchemaNodeExplicitRelationship

All Known Subinterfaces:
AssociationLink, AssociationLinkByLinkTable, AssociationLinkByTableRefInverse, AssociationLinkByXPathLink, SchemaFacetTableRef, SelectionLink

public interface SchemaNodeExplicitRelationship
This interface represents a relationship defined in a resolved data model. A relationship is either a foreign key constraint, a selection link or an association link.
Since:
5.7.1
See Also:
  • Method Details

    • isTableRefLink

      boolean isTableRefLink()
      Returns true if this relationship is a foreign key constraint.
      See Also:
    • isAssociationLink

      boolean isAssociationLink()
      Returns true if this relationship is an association link.
      See Also:
    • isSelectionLink

      boolean isSelectionLink()
      Returns true if this relationship is a selection link.
      See Also:
    • getOwnerNode

      SchemaNode getOwnerNode()
      Returns the node in the data model that defines the explicit relationship.
    • getExplicitRelationship

      ExplicitRelationship getExplicitRelationship(Adaptation aDataset, Session aSession)
      Returns the ExplicitRelationship object associated with this relationship.

      Permissions are resolved using this method. As a consequence, this method returns null if this relationship cannot be viewed by the end-user associated with the given session and in the context of the specified dataset. See SchemaNodeRelationships.getExplicitRelationships() for more information about the resolution of the permissions.

      Throws:
      IllegalArgumentException - if the specified Adaptation is null.
      IllegalStateException - if the specified Adaptation is not a dataset.
      IllegalStateException - if the specified Adaptation has a severe error.
      IllegalStateException - if the specified dataset is not an instance of the data model containing this node.
      IllegalArgumentException - if the specified Session is null.
      See Also:
    • getExplicitRelationship

      ExplicitRelationship getExplicitRelationship()
      Returns the ExplicitRelationship object associated with this relationship. Permissions are not resolved using this method.
      See Also:
    • getResult

      RequestResult getResult(Adaptation aRecord, Session aSessionOrNull)
      Returns the result of this relationship, in the context of the specified record.

      This method never returns null, even if it has no results in the context of the specified record.

      Returned result does not contain duplicate records.

      If a session is specified, then permission rules are applied on the resulting records. This means that records are not included in the result, either if they are themselves hidden or hidden through this relationship (for instance, the link is hidden). In the context of a foreign key constraint, records in the target table are not visible if:

      • The foreign key field is not visible.
      • The target table of the foreign key constraint is not visible.
      In the context of an association link, associated records are not visible in an association if:
      • In the context of an inverse foreign key constraint:
        • The target table of the association is not visible.
        • The foreign key field to the table that define the association is not visible.
      • In the context of a link table:
        • The link table of the association is not visible.
        • The target table of the association is not visible.
        • The foreign key field to source table in the link table is not visible.
        • The foreign key field to target table in the link table is not visible.
        • The records in the link table that link the records in the source and target tables are not visible.
        • In the context of a selection link, records in the target table are not visible if:
          • The fields involved in the selection link are not visible.
          • The target table of the selection link is not visible.
          These rules do not use the property osd:defaultView/hidden that may be defined on the fields and tables involved in the relationship.

      See Also:
    • getContainerReference

      AdaptationReference getContainerReference()
      Returns the reference of the dataset of this link, if an external dataset is defined in the data model, otherwise returns null.
    • getContainerHome

      HomeKey getContainerHome()
      Returns the reference of the dataspace of this link, if an external dataset in another dataspace is defined by the data model, otherwise returns null.
    • getTableNode

      SchemaNode getTableNode()
      Returns the table node referred to by this link.
      See Also: