public class EnumConverter<T,U extends Enum<U>> extends AbstractConverter<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
|
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() |
fromType, toType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
andThen, inverse, of, ofNullable
public final U from(T databaseObject)
Converter
databaseObject
- The database objectpublic T to(U userObject)
Convert a user object to a database object
userObject
- The user objectCopyright © 2017. All Rights Reserved.