Package com.priint.pubserver.entity
Enum Class EntityDependency.EntityCardinality
java.lang.Object
java.lang.Enum<EntityDependency.EntityCardinality>
com.priint.pubserver.entity.EntityDependency.EntityCardinality
- All Implemented Interfaces:
Serializable,Comparable<EntityDependency.EntityCardinality>,Constable
- Enclosing class:
- EntityDependency
public static enum EntityDependency.EntityCardinality
extends Enum<EntityDependency.EntityCardinality>
The cardinality of an
EntityDependency.
You can access a cardinality either via its name or its label.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFor a source entity either none, or an arbitrary number of target entities are expected.For a source entity either none or one target entity is expected.For a source entity exactly one target entity is expected.For a source entity one or more target entities are expected. -
Method Summary
Modifier and TypeMethodDescriptionReturns theEntityDependency.EntityCardinalityfor the labelgetLabel()Get the label to display in the user interface.Returns the enum constant of this class with the specified name.static EntityDependency.EntityCardinality[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ONE_TO_ONE
For a source entity exactly one target entity is expected. If no target exists or more than one exists this dependency is invalid. -
ONE_TO_NONE_OR_ONE
For a source entity either none or one target entity is expected. If more than one target exists this dependency is invalid. -
ONE_TO_NONE_OR_MANY
For a source entity either none, or an arbitrary number of target entities are expected. Any number of targets are consitent with with. -
ONE_TO_ONE_OR_MANY
For a source entity one or more target entities are expected. If no target exists this dependency is invalid.
-
-
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
-
getLabel
Get the label to display in the user interface.- Returns:
- label as String
-
fromLabel
Returns theEntityDependency.EntityCardinalityfor the label- Parameters:
label- the label- Returns:
- a
EntityDependency.EntityCardinality - Throws:
EnumConstantNotPresentException- if the label does not map to an enum
-