Package org.datanucleus.metadata
Enum DiscriminatorStrategy
- All Implemented Interfaces:
Serializable
,Comparable<DiscriminatorStrategy>
Representation of the values for discriminator "strategy".
- VALUE_MAP where you define a value for each class, with no fallback default.
- CLASS_NAME where the class name is used as the discriminator value
- VALUE_MAP_ENTITY_NAME where you define a value for each class, but the fallback is the entity name when no value is provided.
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DiscriminatorStrategy
getDiscriminatorStrategy
(String value) Accessor for the strategytoString()
static DiscriminatorStrategy
Returns the enum constant of this type with the specified name.static DiscriminatorStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NONE
-
VALUE_MAP
-
CLASS_NAME
-
VALUE_MAP_ENTITY_NAME
-
-
Field Details
-
name
String name
-
-
Constructor Details
-
DiscriminatorStrategy
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
toString
- Overrides:
toString
in classEnum<DiscriminatorStrategy>
-
getDiscriminatorStrategy
Accessor for the strategy- Parameters:
value
- The string form- Returns:
- The strategy
-