Enum AttributeCardinality
- java.lang.Object
-
- java.lang.Enum<AttributeCardinality>
-
- org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.AttributeCardinality
-
- All Implemented Interfaces:
Serializable,Comparable<AttributeCardinality>
public enum AttributeCardinality extends Enum<AttributeCardinality> implements Serializable
AttributeCardinality is used on a association from one TypeDef to another. It defines how many instances the "linked to" TypeDef are permitted to be connected to the "linked from" TypeDef:- UNKNOWN: uninitialized cardinality
- AT_MOST_ONE: means there can be zero or one instances connected to an instance of this TypeDef. This relationship is often written as 0..1.
- ONE_ONLY: means there must be one instance, no more and no less.
- AT_LEAST_ONE_ORDERED: means there must be one or more instances connected to an instance of this TypeDef. This relationship is often written as 1..*. The linked instances are maintained in an ordered list/array.
- AT_LEAST_ONE_UNORDERED: means there must be one or more instances connected to an instance of this TypeDef. This relationship is often written as 1..*. The linked instances are maintained in an unordered set.
- ANY_NUMBER_ORDERED: means there can be none, one or many instances connected an instance of this TypeDef. This relationship is often written as 0..*. The linked instances are maintained in an ordered list/array.
- ANY_NUMBER_UNORDERED: means there can be none, one or many instances connected an instance of this TypeDef. This relationship is often written as 0..*. The linked instances are maintained in an unordered set.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANY_NUMBER_ORDEREDANY_NUMBER_UNORDEREDAT_LEAST_ONE_ORDEREDAT_LEAST_ONE_UNORDEREDAT_MOST_ONEONE_ONLYUNKNOWN
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescription()Return the default description of the cardinality.StringgetName()Return the default name of the cardinality.intgetOrdinal()Return the numeric representation of the cardinality.StringtoString()toString() JSON-stylestatic AttributeCardinalityvalueOf(String name)Returns the enum constant of this type with the specified name.static AttributeCardinality[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final AttributeCardinality UNKNOWN
-
AT_MOST_ONE
public static final AttributeCardinality AT_MOST_ONE
-
ONE_ONLY
public static final AttributeCardinality ONE_ONLY
-
AT_LEAST_ONE_ORDERED
public static final AttributeCardinality AT_LEAST_ONE_ORDERED
-
AT_LEAST_ONE_UNORDERED
public static final AttributeCardinality AT_LEAST_ONE_UNORDERED
-
ANY_NUMBER_ORDERED
public static final AttributeCardinality ANY_NUMBER_ORDERED
-
ANY_NUMBER_UNORDERED
public static final AttributeCardinality ANY_NUMBER_UNORDERED
-
-
Method Detail
-
values
public static AttributeCardinality[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AttributeCardinality c : AttributeCardinality.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AttributeCardinality valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getOrdinal
public int getOrdinal()
Return the numeric representation of the cardinality.- Returns:
- int ordinal
-
getName
public String getName()
Return the default name of the cardinality.- Returns:
- String name
-
getDescription
public String getDescription()
Return the default description of the cardinality.- Returns:
- String description
-
toString
public String toString()
toString() JSON-style- Overrides:
toStringin classEnum<AttributeCardinality>- Returns:
- string description
-
-