Package org.brapi.schematools.core.model
Enum Class BrAPIRelationshipType
- All Implemented Interfaces:
Serializable,Comparable<BrAPIRelationshipType>,Constable
The type of relationship between types
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA relationship that denotes a many-to-many relationshipA relationship that denotes a many-to-one relationshipA relationship that denotes a one-to-many relationshipA relationship that denotes a one-to-one relationship -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<BrAPIRelationshipType> findByNameOrLabel(String nameOrLabel) Find the Relationship Type by its name or label, case-insensitive.static Response<BrAPIRelationshipType> fromNameOrLabel(String nameOrLabel) Find the Relationship Type by its name or label, case-insensitive.static Response<List<BrAPIRelationshipType>> fromNameOrLabels(List<String> nameOrLabels) Find the Relationship Types by names or labels, case-insensitive.static BrAPIRelationshipTypeReturns the enum constant of this class with the specified name.static BrAPIRelationshipType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ONE_TO_ONE
A relationship that denotes a one-to-one relationship -
ONE_TO_MANY
A relationship that denotes a one-to-many relationship -
MANY_TO_ONE
A relationship that denotes a many-to-one relationship -
MANY_TO_MANY
A relationship that denotes a many-to-many relationship
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
fromNameOrLabel
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
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
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
-