public enum Cardinality extends Enum<Cardinality>
EntityRelationship
.EntityRelationship
,
EntityRelationship.Entity
Enum Constant and Description |
---|
MANY
The entities on the other side of the relation may reference 0 to many
entites with this Cardinality.
|
ONE
The entities on the other side of the relation can reference at most one
entity with this Cardinality.
|
Modifier and Type | Method and Description |
---|---|
static Cardinality |
get(String shortcut)
Returns the enum value for a specified shortcut.
|
String |
getShortcut()
Returns the shortcut for this enum value.
|
String |
toString()
Returns a string representation of this enum value, consisting of the
shortcut.
|
static Cardinality |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Cardinality[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Cardinality ONE
public static final Cardinality MANY
public static Cardinality[] values()
for (Cardinality c : Cardinality.values()) System.out.println(c);
public static Cardinality valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static Cardinality get(String shortcut)
shortcut
- a valid shortcurt for a Cardinality
value.Cardinality
IllegalArgumentException
- if an invalid shortcut
was used.public String getShortcut()
public String toString()
toString
in class Enum<Cardinality>
Copyright © 2003–2022 XDEV Software. All rights reserved.