Enum Class BrAPIRelationshipType

java.lang.Object
java.lang.Enum<BrAPIRelationshipType>
org.brapi.schematools.core.model.BrAPIRelationshipType
All Implemented Interfaces:
Serializable, Comparable<BrAPIRelationshipType>, Constable

public enum BrAPIRelationshipType extends Enum<BrAPIRelationshipType>
The type of relationship between types
  • Enum Constant Details

    • ONE_TO_ONE

      public static final BrAPIRelationshipType ONE_TO_ONE
      A relationship that denotes a one-to-one relationship
    • ONE_TO_MANY

      public static final BrAPIRelationshipType ONE_TO_MANY
      A relationship that denotes a one-to-many relationship
    • MANY_TO_ONE

      public static final BrAPIRelationshipType MANY_TO_ONE
      A relationship that denotes a many-to-one relationship
    • MANY_TO_MANY

      public static final BrAPIRelationshipType MANY_TO_MANY
      A relationship that denotes a many-to-many relationship
  • Method Details

    • values

      public static BrAPIRelationshipType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static BrAPIRelationshipType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromNameOrLabel

      public static Response<BrAPIRelationshipType> fromNameOrLabel(String nameOrLabel)
      Find the Relationship Type by its name or label, case-insensitive.
      Parameters:
      nameOrLabel - the name or label to search for
      Returns:
      Relationship Type that matches the provided name or label
    • fromNameOrLabels

      public static Response<List<BrAPIRelationshipType>> fromNameOrLabels(List<String> nameOrLabels)
      Find the Relationship Types by names or labels, case-insensitive.
      Parameters:
      nameOrLabels - a list of names or labels to search for
      Returns:
      Relationship Types that matches the provided names or labels
    • findByNameOrLabel

      public static Optional<BrAPIRelationshipType> findByNameOrLabel(String nameOrLabel)
      Find the Relationship Type by its name or label, case-insensitive.
      Parameters:
      nameOrLabel - the name or label to search for
      Returns:
      An optional containing Relationship Type that matches the provided name or label, or an empty optional