Interface Relation

All Known Implementing Classes:
RelationImpl

public interface Relation
This class describes a relation between two objects or interfaces of the GraphQL Schema. It's used to generate the GraphQLProvider class, which declares every Data Fetchers, and the GraphQlDataFetchers, which contains these Data Fetchers.
Author:
etienne-sf
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the annotation to add to this field, when in server mode, to serve the relation that this field holds
    Returns the name of the DataFetcher to use for this relation.
    Get the Field which handles this association.
    If this association is bidirectionnal, and this object is not the owner of the relation, this method returns the field in the Object/Entity that owns this relation.
    Returns the type of the object, which contains this field
    Returns the JPA relation type of this relation
    boolean
    Indicates whether the object type obtained by getObjectType() is the owner or not of this relation.
    As described in the JPA documentation: a bidirectional relationship has both an owning side and an inverse side.
  • Method Details

    • getObjectType

      Type getObjectType()
      Returns the type of the object, which contains this field
      Returns:
    • getField

      Field getField()
      Get the Field which handles this association. The Field.getType() is the target Object/Entity of the association.
      Returns:
    • getRelationType

      RelationType getRelationType()
      Returns the JPA relation type of this relation
      Returns:
    • isOwnerSide

      boolean isOwnerSide()
      Indicates whether the object type obtained by getObjectType() is the owner or not of this relation.
      As described in the JPA documentation: a bidirectional relationship has both an owning side and an inverse side.
      Returns:
    • getMappedyBy

      Field getMappedyBy()
      If this association is bidirectionnal, and this object is not the owner of the relation, this method returns the field in the Object/Entity that owns this relation.
      Returns:
    • getDataFetcherName

      String getDataFetcherName()
      Returns the name of the DataFetcher to use for this relation.
      Returns:
    • getAnnotation

      Object getAnnotation()
      Retrieves the annotation to add to this field, when in server mode, to serve the relation that this field holds
      Returns:
      The relevant annotation, or "" (an empty string) if there no annotation to add