org.jcoderz.commons.types.samples
Class TestEnumAsNumericUserType
java.lang.Object
org.jcoderz.commons.util.UserTypeBase
org.jcoderz.commons.util.IntUserTypeBase
org.jcoderz.commons.types.samples.TestEnumAsNumericUserType
- All Implemented Interfaces:
- Serializable, org.hibernate.usertype.UserType
public final class TestEnumAsNumericUserType
- extends IntUserTypeBase
Hibernate user type for the TestEnumAsNumeric.
- Author:
- generated via stylesheet
- See Also:
- Serialized Form
|
Method Summary |
Object |
fromInt(int value)
Creates a TestEnumAsNumeric from its numeric
int database representation. |
static org.hibernate.type.Type |
getType()
Hibernate TestEnumAsNumeric type as mapped
from this UserType. |
Class |
returnedClass()
|
int |
toInt(Object value)
Converts the TestEnumAsNumeric to its numeric
int database representation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestEnumAsNumericUserType
public TestEnumAsNumericUserType()
getType
public static org.hibernate.type.Type getType()
- Hibernate TestEnumAsNumeric type as mapped
from this UserType.
- Returns:
- this UserType as org.hibernate.type.Type.
fromInt
public Object fromInt(int value)
- Creates a TestEnumAsNumeric from its numeric
int database representation.
- Specified by:
fromInt in class IntUserTypeBase
- Parameters:
value - a int holding the database representation of the
TestEnumAsNumeric.
- Returns:
- a TestEnumAsNumeric representing the
given int.
- See Also:
TestEnumAsNumeric.fromInt(int)
toInt
public int toInt(Object value)
- Converts the TestEnumAsNumeric to its numeric
int database representation.
- Specified by:
toInt in class IntUserTypeBase
- Parameters:
value - the TestEnumAsNumeric to be
converted.
- Returns:
- a int representing the
given TestEnumAsNumeric.
- See Also:
TestEnumAsNumeric.toInt()
returnedClass
public Class returnedClass()
- Description copied from class:
UserTypeBase
-
- Specified by:
returnedClass in interface org.hibernate.usertype.UserType- Specified by:
returnedClass in class UserTypeBase
- Returns:
- TestEnumAsNumeric.class as the supported
class of this user type.
Copyright 2007 The jCoderZ Project.