Class AbstractArrayUserType
- java.lang.Object
-
- org.kiwiproject.hibernate.usertype.AbstractArrayUserType
-
- All Implemented Interfaces:
org.hibernate.usertype.UserType
- Direct Known Subclasses:
BigintArrayUserType,TextArrayUserType
public abstract class AbstractArrayUserType extends Object implements org.hibernate.usertype.UserType
Abstract base class for custom Hibernate user-defined array types.- Implementation Note:
- Suppress Sonar "'throws' declarations should not be superfluous" warning since the signatures come directly from UserType and we are just preserving them.
-
-
Constructor Summary
Constructors Constructor Description AbstractArrayUserType()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Objectassemble(Serializable cached, Object owner)abstract StringdatabaseTypeName()Implementors should return the specific database type name that the array contains, e.g.ObjectdeepCopy(Object value)Serializabledisassemble(Object value)booleanequals(Object ol, Object o2)inthashCode(Object obj)booleanisMutable()ObjectnullSafeGet(ResultSet resultSet, String[] names, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner)voidnullSafeSet(PreparedStatement statement, Object value, int index, org.hibernate.engine.spi.SharedSessionContractImplementor session)Objectreplace(Object original, Object target, Object owner)int[]sqlTypes()
-
-
-
Method Detail
-
databaseTypeName
public abstract String databaseTypeName()
Implementors should return the specific database type name that the array contains, e.g.TEXTif the database array type isTEXT[].- Returns:
- the database type name
-
sqlTypes
public int[] sqlTypes()
- Specified by:
sqlTypesin interfaceorg.hibernate.usertype.UserType
-
equals
public boolean equals(Object ol, Object o2) throws org.hibernate.HibernateException
- Specified by:
equalsin interfaceorg.hibernate.usertype.UserType- Throws:
org.hibernate.HibernateException
-
hashCode
public int hashCode(Object obj) throws org.hibernate.HibernateException
- Specified by:
hashCodein interfaceorg.hibernate.usertype.UserType- Throws:
org.hibernate.HibernateException
-
nullSafeGet
public Object nullSafeGet(ResultSet resultSet, String[] names, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner) throws org.hibernate.HibernateException, SQLException
- Specified by:
nullSafeGetin interfaceorg.hibernate.usertype.UserType- Throws:
org.hibernate.HibernateExceptionSQLException
-
nullSafeSet
public void nullSafeSet(PreparedStatement statement, Object value, int index, org.hibernate.engine.spi.SharedSessionContractImplementor session) throws org.hibernate.HibernateException, SQLException
- Specified by:
nullSafeSetin interfaceorg.hibernate.usertype.UserType- Throws:
org.hibernate.HibernateExceptionSQLException
-
deepCopy
public Object deepCopy(Object value) throws org.hibernate.HibernateException
- Specified by:
deepCopyin interfaceorg.hibernate.usertype.UserType- Throws:
org.hibernate.HibernateException
-
isMutable
public boolean isMutable()
- Specified by:
isMutablein interfaceorg.hibernate.usertype.UserType
-
disassemble
public Serializable disassemble(Object value) throws org.hibernate.HibernateException
- Specified by:
disassemblein interfaceorg.hibernate.usertype.UserType- Throws:
org.hibernate.HibernateException
-
assemble
public Object assemble(Serializable cached, Object owner) throws org.hibernate.HibernateException
- Specified by:
assemblein interfaceorg.hibernate.usertype.UserType- Throws:
org.hibernate.HibernateException
-
-