Package org.jooq.impl
Class EnumConverter<T,U extends java.lang.Enum<U>>
- java.lang.Object
-
- org.jooq.impl.AbstractConverter<T,U>
-
- org.jooq.impl.EnumConverter<T,U>
-
- All Implemented Interfaces:
java.io.Serializable
,Converter<T,U>
public class EnumConverter<T,U extends java.lang.Enum<U>> extends AbstractConverter<T,U>
A base class for enum conversion.- Author:
- Lukas Eder
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EnumConverter(java.lang.Class<T> fromType, java.lang.Class<U> toType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description U
from(T databaseObject)
Convert a database object to a user objectT
to(U userObject)
Subclasses may override this method to provide a custom reverse mapping implementationjava.lang.String
toString()
-
Methods inherited from class org.jooq.impl.AbstractConverter
fromType, toType
-
-
-
-
Method Detail
-
from
public final U from(T databaseObject)
Description copied from interface:Converter
Convert a database object to a user object- Parameters:
databaseObject
- The database object- Returns:
- The user object
-
to
public T to(U userObject)
Subclasses may override this method to provide a custom reverse mapping implementationConvert a user object to a database object
- Parameters:
userObject
- The user object- Returns:
- The database object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractConverter<T,U extends java.lang.Enum<U>>
-
-