public class EnumConverter<T,U extends java.lang.Enum<U>> extends java.lang.Object implements Converter<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
|
java.lang.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
|
java.lang.String |
toString() |
java.lang.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 java.lang.Class<T> fromType()
Converter
public final java.lang.Class<U> toType()
Converter
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2014. All Rights Reserved.