public class EnumConverter<T,U extends java.lang.Enum<U>> extends AbstractConverter<T,U>
Constructor and Description |
---|
EnumConverter(java.lang.Class<T> fromType,
java.lang.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
|
java.lang.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 objectpublic java.lang.String toString()
toString
in class AbstractConverter<T,U extends java.lang.Enum<U>>
Copyright © 2018. All Rights Reserved.