Package org.apache.openjpa.meta
Class ValueStrategies
- java.lang.Object
-
- org.apache.openjpa.meta.ValueStrategies
-
public class ValueStrategies extends java.lang.Object
Strategies for persistent value generation.- Since:
- 0.4.0
- Author:
- Abe White
-
-
Field Summary
Fields Modifier and Type Field Description static int
AUTOASSIGN
"autoassigned" value strategy.static int
INCREMENT
"increment" value strategy.static int
NATIVE
"native" value strategy.static int
NONE
No value strategy.static int
SEQUENCE
"sequence" value strategy.static int
UUID_HEX
"uuid-hex" value strategy.static int
UUID_STRING
"uuid-string" value strategy.static int
UUID_TYPE4_HEX
"uuid-type4-hex" value strategy.static int
UUID_TYPE4_STRING
"uuid-type4-string" value strategy.
-
Constructor Summary
Constructors Constructor Description ValueStrategies()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
assertSupported(int strategy, MetaDataContext context, java.lang.String attributeName)
Assert that the given strategy is supported by the current runtime.static int
getCode(java.lang.String val, java.lang.Object context)
Convert the given strategy name to its constant.static java.lang.String
getName(int strategy)
Convert the given strategy to a name.
-
-
-
Field Detail
-
NONE
public static final int NONE
No value strategy.- See Also:
- Constant Field Values
-
NATIVE
public static final int NATIVE
"native" value strategy.- See Also:
- Constant Field Values
-
SEQUENCE
public static final int SEQUENCE
"sequence" value strategy.- See Also:
- Constant Field Values
-
AUTOASSIGN
public static final int AUTOASSIGN
"autoassigned" value strategy.- See Also:
- Constant Field Values
-
INCREMENT
public static final int INCREMENT
"increment" value strategy.- See Also:
- Constant Field Values
-
UUID_STRING
public static final int UUID_STRING
"uuid-string" value strategy.- See Also:
- Constant Field Values
-
UUID_HEX
public static final int UUID_HEX
"uuid-hex" value strategy.- See Also:
- Constant Field Values
-
UUID_TYPE4_STRING
public static final int UUID_TYPE4_STRING
"uuid-type4-string" value strategy.- See Also:
- Constant Field Values
-
UUID_TYPE4_HEX
public static final int UUID_TYPE4_HEX
"uuid-type4-hex" value strategy.- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public static java.lang.String getName(int strategy)
Convert the given strategy to a name.
-
getCode
public static int getCode(java.lang.String val, java.lang.Object context)
Convert the given strategy name to its constant.
-
assertSupported
public static void assertSupported(int strategy, MetaDataContext context, java.lang.String attributeName)
Assert that the given strategy is supported by the current runtime.
-
-