org.hibernate.usertype.UserTypepublic final class IntBooleanType extends Object implements org.hibernate.usertype.UserType
UserType to map a Java boolean or java.lang.Boolean
property to an SQL column of type INT with the values 0 (= false) or 1 (= true).
This is necessary because of the legacy ITracker 2.x database schema which uses INT instead of BOOLEAN or BIT, which aren't supported by all databases (e.g. DB2).
| Constructor | Description |
|---|---|
IntBooleanType() |
Default constructor, required by Hibernate.
|
| Modifier and Type | Method | Description |
|---|---|---|
Object |
assemble(Serializable cached,
Object owner) |
|
Object |
deepCopy(Object value) |
|
Serializable |
disassemble(Object value) |
|
boolean |
equals(Object x,
Object y) |
Implements persistence equality.
|
int |
hashCode(Object x) |
|
boolean |
isMutable() |
|
Object |
nullSafeGet(ResultSet resultSet,
String[] names,
Object owner) |
|
void |
nullSafeSet(PreparedStatement statement,
Object value,
int index) |
|
Object |
replace(Object original,
Object target,
Object owner) |
|
Class<Boolean> |
returnedClass() |
|
int[] |
sqlTypes() |
public IntBooleanType()
public void nullSafeSet(PreparedStatement statement, Object value, int index) throws org.hibernate.HibernateException, SQLException
nullSafeSet in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionSQLExceptionpublic Object nullSafeGet(ResultSet resultSet, String[] names, Object owner) throws org.hibernate.HibernateException, SQLException
nullSafeGet in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionSQLExceptionpublic int hashCode(Object x) throws org.hibernate.HibernateException
hashCode in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionpublic Serializable disassemble(Object value) throws org.hibernate.HibernateException
disassemble in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionpublic Object deepCopy(Object value) throws org.hibernate.HibernateException
deepCopy in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionpublic int[] sqlTypes()
sqlTypes in interface org.hibernate.usertype.UserTypepublic Class<Boolean> returnedClass()
returnedClass in interface org.hibernate.usertype.UserTypepublic Object replace(Object original, Object target, Object owner) throws org.hibernate.HibernateException
replace in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionpublic boolean isMutable()
isMutable in interface org.hibernate.usertype.UserTypepublic boolean equals(Object x, Object y) throws org.hibernate.HibernateException
equals in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionpublic Object assemble(Serializable cached, Object owner) throws org.hibernate.HibernateException
assemble in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionCopyright © 2002–2019 itracker. All rights reserved.