public class EnumConverter<T,U extends Enum<U>> extends Object implements Converter<T,U>
Constructor and Description |
---|
EnumConverter(Class<T> fromType,
Class<U> toType) |
Modifier and Type | Method and Description |
---|---|
U |
from(T databaseObject)
Convert a database object to a user object
|
Class<T> |
fromType()
The database type
|
T |
to(U userObject)
Subclasses may override this method to provide a custom reverse mapping
implementation
Convert a user object to a database object
|
String |
toString() |
Class<U> |
toType()
The user type
|
public final U from(T databaseObject)
Converter
public T to(U userObject)
Convert a user object to a database object
public final Class<T> fromType()
Converter
Copyright © 2014. All Rights Reserved.