public class StringJsonUserType extends Object implements org.hibernate.usertype.UserType
| Constructor and Description |
|---|
StringJsonUserType() |
| Modifier and Type | Method and Description |
|---|---|
Object |
assemble(Serializable cached,
Object owner)
Reconstruct an object from the cacheable representation.
|
Object |
deepCopy(Object value)
Return a deep copy of the persistent state, stopping at entities and at
collections.
|
Serializable |
disassemble(Object value)
Transform the object into its cacheable representation.
|
boolean |
equals(Object x,
Object y)
Compare two instances of the class mapped by this type for persistence "equality".
|
int |
hashCode(Object x)
Get a hashcode for the instance, consistent with persistence "equality"
|
boolean |
isMutable()
Are objects of this type mutable?
|
Object |
nullSafeGet(ResultSet rs,
String[] names,
org.hibernate.engine.spi.SessionImplementor session,
Object owner)
Retrieve an instance of the mapped class from a JDBC resultset.
|
void |
nullSafeSet(PreparedStatement st,
Object value,
int index,
org.hibernate.engine.spi.SessionImplementor session)
Write an instance of the mapped class to a prepared statement.
|
Object |
replace(Object original,
Object target,
Object owner)
During merge, replace the existing (target) value in the entity we are merging to
with a new (original) value from the detached entity we are merging.
|
Class |
returnedClass()
The class returned by nullSafeGet().
|
int[] |
sqlTypes()
Return the SQL type codes for the columns mapped by this type.
|
public int[] sqlTypes()
sqlTypes in interface org.hibernate.usertype.UserTypeTypespublic Class returnedClass()
returnedClass in interface org.hibernate.usertype.UserTypepublic boolean equals(Object x, Object y) throws org.hibernate.HibernateException
equals in interface org.hibernate.usertype.UserTypex - y - org.hibernate.HibernateExceptionpublic int hashCode(Object x) throws org.hibernate.HibernateException
hashCode in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionpublic Object nullSafeGet(ResultSet rs, String[] names, org.hibernate.engine.spi.SessionImplementor session, Object owner) throws org.hibernate.HibernateException, SQLException
nullSafeGet in interface org.hibernate.usertype.UserTypers - a JDBC result setnames - the column namessession - owner - the containing entity @return Objectorg.hibernate.HibernateExceptionSQLExceptionpublic void nullSafeSet(PreparedStatement st, Object value, int index, org.hibernate.engine.spi.SessionImplementor session) throws org.hibernate.HibernateException, SQLException
nullSafeSet in interface org.hibernate.usertype.UserTypest - a JDBC prepared statementvalue - the object to writeindex - statement parameter indexsession - org.hibernate.HibernateExceptionSQLExceptionpublic Object deepCopy(Object value) throws org.hibernate.HibernateException
deepCopy in interface org.hibernate.usertype.UserTypevalue - the object to be cloned, which may be nullorg.hibernate.HibernateExceptionpublic boolean isMutable()
isMutable in interface org.hibernate.usertype.UserTypepublic Serializable disassemble(Object value) throws org.hibernate.HibernateException
disassemble in interface org.hibernate.usertype.UserTypevalue - the object to be cachedorg.hibernate.HibernateExceptionpublic Object assemble(Serializable cached, Object owner) throws org.hibernate.HibernateException
assemble in interface org.hibernate.usertype.UserTypecached - the object to be cachedowner - the owner of the cached objectorg.hibernate.HibernateExceptionpublic Object replace(Object original, Object target, Object owner) throws org.hibernate.HibernateException
replace in interface org.hibernate.usertype.UserTypeoriginal - the value from the detached entity being mergedtarget - the value in the managed entityorg.hibernate.HibernateExceptionCopyright © 2015–2016 eGovernments Foundation. All rights reserved.