Class ConvertibleToLongUserType<T>
java.lang.Object
com.atlassian.bamboo.persistence3.ConvertibleToLongUserType<T>
- All Implemented Interfaces:
Serializable
,org.hibernate.usertype.UserType
- Direct Known Subclasses:
BambooEntityOidUserType
public abstract class ConvertibleToLongUserType<T>
extends Object
implements org.hibernate.usertype.UserType, Serializable
Extend this class to create your own hibernate type
that is a wrapper for long value (with added semantic information)
Important: this class is only applicable for immutable classes!
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassemble
(Serializable cached, Object owner) disassemble
(Object value) boolean
abstract T
fromLong
(long longValue) int
boolean
nullSafeGet
(ResultSet rs, String[] names, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner) void
nullSafeSet
(PreparedStatement st, Object value, int index, org.hibernate.engine.spi.SharedSessionContractImplementor session) int[]
sqlTypes()
abstract long
-
Constructor Details
-
ConvertibleToLongUserType
-
-
Method Details
-
fromLong
-
toLong
-
sqlTypes
public int[] sqlTypes()- Specified by:
sqlTypes
in interfaceorg.hibernate.usertype.UserType
-
returnedClass
- Specified by:
returnedClass
in interfaceorg.hibernate.usertype.UserType
-
equals
- Specified by:
equals
in interfaceorg.hibernate.usertype.UserType
- Throws:
org.hibernate.HibernateException
-
deepCopy
- Specified by:
deepCopy
in interfaceorg.hibernate.usertype.UserType
- Throws:
org.hibernate.HibernateException
-
isMutable
public boolean isMutable()- Specified by:
isMutable
in interfaceorg.hibernate.usertype.UserType
-
hashCode
- Specified by:
hashCode
in interfaceorg.hibernate.usertype.UserType
- Throws:
org.hibernate.HibernateException
-
disassemble
- Specified by:
disassemble
in interfaceorg.hibernate.usertype.UserType
- Throws:
org.hibernate.HibernateException
-
assemble
- Specified by:
assemble
in interfaceorg.hibernate.usertype.UserType
- Throws:
org.hibernate.HibernateException
-
replace
public Object replace(Object original, Object target, Object owner) throws org.hibernate.HibernateException - Specified by:
replace
in interfaceorg.hibernate.usertype.UserType
- Throws:
org.hibernate.HibernateException
-