Implementing a new strategy does the conversion using methods declared within Enum. The purpose of this strategy is to provide the flexibility to implement an AttributeConverter but without the additional work of creating an extra class for that task.
Example:
public enum MyEnum {
// Enum constants and constructor
public V toDbData() {
// Convert to the type to be sent to the database.
}
public static MyEnum fromDbData(V dbData) {
// Converts from the value stored in the database to one of the enum constants
}
}