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