| Constructor and Description |
|---|
EnumOrdinalConverter(Class<E> enumClass) |
| Modifier and Type | Method and Description |
|---|---|
E |
convertToMapped(Class<? extends E> type,
Integer value)
Convert the persisted type B to the mapped type A.
|
Integer |
convertToPersisted(E value)
Convert the mapped type A to the persisted type B.
|
Class<E> |
getMappedType() |
Integer |
getPersistedSize() |
Class<Integer> |
getPersistedType() |
public Class<E> getMappedType()
getMappedType in interface Converter<E extends Enum,Integer>public Class<Integer> getPersistedType()
getPersistedType in interface Converter<E extends Enum,Integer>public Integer getPersistedSize()
getPersistedSize in interface Converter<E extends Enum,Integer>public Integer convertToPersisted(E value)
ConverterconvertToPersisted in interface Converter<E extends Enum,Integer>value - to convertpublic E convertToMapped(Class<? extends E> type, Integer value)
ConverterconvertToMapped in interface Converter<E extends Enum,Integer>type - the type to convertvalue - value to convert