public class JAXBTypesafeEnumConverter extends java.lang.Object implements Converter
Constructor and Description |
---|
JAXBTypesafeEnumConverter()
PUBLIC:
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
convertDataValueToObjectValue(java.lang.Object dataValue,
Session session)
INTERNAL:
The fromString value on the enum class must be invoked with the field value
specified as an argument.
|
java.lang.Object |
convertObjectValueToDataValue(java.lang.Object objectValue,
Session session)
INTERNAL:
Return the attribute value.
|
java.lang.Class |
getEnumClass()
PUBLIC:
Get the class which was set as the enum class which contains the fromValue method.
|
java.lang.String |
getEnumClassName()
PUBLIC:
Get the name of the enum class which contains the fromValue method.
|
void |
initialize(DatabaseMapping mapping,
Session session)
INTERNAL:
Set the enum class.
|
boolean |
isMutable()
PUBLIC:
If the converter converts the value to a mutable value, i.e.
|
void |
setEnumClass(java.lang.Class enumClass)
PUBLIC:
Set the enum class to know which class to invoke the fromValue method on.
|
void |
setEnumClassName(java.lang.String newClassName)
PUBLIC:
Set the name of the enum class to know which class to invoke the fromValue method on.
|
public JAXBTypesafeEnumConverter()
public java.lang.Object convertObjectValueToDataValue(java.lang.Object objectValue, Session session)
convertObjectValueToDataValue
in interface CoreConverter<DatabaseMapping,Session>
convertObjectValueToDataValue
in interface Converter
public java.lang.Object convertDataValueToObjectValue(java.lang.Object dataValue, Session session)
convertDataValueToObjectValue
in interface CoreConverter<DatabaseMapping,Session>
convertDataValueToObjectValue
in interface Converter
public boolean isMutable()
Converter
public void initialize(DatabaseMapping mapping, Session session)
initialize
in interface CoreConverter<DatabaseMapping,Session>
initialize
in interface Converter
public java.lang.String getEnumClassName()
public void setEnumClassName(java.lang.String newClassName)
public void setEnumClass(java.lang.Class enumClass)
public java.lang.Class getEnumClass()