Package org.datanucleus.metadata
Enum SequenceStrategy
- java.lang.Object
-
- java.lang.Enum<SequenceStrategy>
-
- org.datanucleus.metadata.SequenceStrategy
-
- All Implemented Interfaces:
Serializable
,Comparable<SequenceStrategy>
public enum SequenceStrategy extends Enum<SequenceStrategy>
Representation of strategy of a Sequence.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONTIGUOUS
NONCONTIGUOUS
NONTRANSACTIONAL
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SequenceStrategy
getStrategy(String value)
Return Sequence strategy from String.String
toString()
static SequenceStrategy
valueOf(String name)
Returns the enum constant of this type with the specified name.static SequenceStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONTRANSACTIONAL
public static final SequenceStrategy NONTRANSACTIONAL
-
CONTIGUOUS
public static final SequenceStrategy CONTIGUOUS
-
NONCONTIGUOUS
public static final SequenceStrategy NONCONTIGUOUS
-
-
Method Detail
-
values
public static SequenceStrategy[] 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 (SequenceStrategy c : SequenceStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SequenceStrategy 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<SequenceStrategy>
-
getStrategy
public static SequenceStrategy getStrategy(String value)
Return Sequence strategy from String.- Parameters:
value
- sequence strategy- Returns:
- Instance of SequenceStrategy. If parse failed, return null.
-
-