- java.lang.Object
-
- org.jooq.impl.AbstractConverter<T,U>
-
- org.jooq.impl.EnumConverter<T,U>
-
- All Implemented Interfaces:
Serializable
,Converter<T,U>
public class EnumConverter<T,U extends 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(Class<T> fromType, 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 implementationString
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
-
-