Package org.datanucleus.metadata
Enum DiscriminatorStrategy
- java.lang.Object
-
- java.lang.Enum<DiscriminatorStrategy>
-
- org.datanucleus.metadata.DiscriminatorStrategy
-
- All Implemented Interfaces:
Serializable
,Comparable<DiscriminatorStrategy>
public enum DiscriminatorStrategy extends Enum<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 Enum Constant Description CLASS_NAME
NONE
VALUE_MAP
VALUE_MAP_ENTITY_NAME
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DiscriminatorStrategy
getDiscriminatorStrategy(String value)
Accessor for the strategyString
toString()
static DiscriminatorStrategy
valueOf(String name)
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 Detail
-
NONE
public static final DiscriminatorStrategy NONE
-
VALUE_MAP
public static final DiscriminatorStrategy VALUE_MAP
-
CLASS_NAME
public static final DiscriminatorStrategy CLASS_NAME
-
VALUE_MAP_ENTITY_NAME
public static final DiscriminatorStrategy VALUE_MAP_ENTITY_NAME
-
-
Method Detail
-
values
public static DiscriminatorStrategy[] 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 (DiscriminatorStrategy c : DiscriminatorStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DiscriminatorStrategy 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
-
toString
public String toString()
- Overrides:
toString
in classEnum<DiscriminatorStrategy>
-
getDiscriminatorStrategy
public static DiscriminatorStrategy getDiscriminatorStrategy(String value)
Accessor for the strategy- Parameters:
value
- The string form- Returns:
- The strategy
-
-