Package org.apache.openjpa.persistence
Interface OpenJPAEnum<E extends Enum<?>>
- Type Parameters:
E
- the enum type that needs to be converted.
- All Known Implementing Classes:
FetchMode
,IsolationLevel
,LRSSizeAlgorithm
,ResultSetType
public interface OpenJPAEnum<E extends Enum<?>>
An interface to define conversion of a facade based enum to a kernel integer constant.
Facade specific enums implement this interface to convert user specified string or integer.
- Since:
- 2.0.0
- Author:
- Pinaki Poddar
-
Method Summary
Modifier and TypeMethodDescriptionint
convertToKernelConstant
(int i) Convert the given integer to an equivalent kernel constant.int
Convert the given String to an equivalent kernel constant.int
Convert this receiver to an equivalent kernel constant.
-
Method Details
-
toKernelConstant
int toKernelConstant()Convert this receiver to an equivalent kernel constant. -
convertToKernelConstant
int convertToKernelConstant(int i) Convert the given integer to an equivalent kernel constant. This method has a static semantics in the sense that it can be invoked on any enum instance, but the conversion is done w.r.t. all enums of the generic type. -
convertToKernelConstant
Convert the given String to an equivalent kernel constant. This method has a static semantics in the sense that it can be invoked on any enum instance, but the conversion is done w.r.t. all enums of the generic type.
-