public class

SerializableToBlobType

extends AbstractLobType
implements ParameterizedType
java.lang.Object
   ↳ org.hibernate.type.AbstractType
     ↳ org.hibernate.type.AbstractLobType
       ↳ org.hibernate.type.SerializableToBlobType

Summary

Constants
String CLASS_NAME class name of the serialisable class
Public Constructors
SerializableToBlobType()
Public Methods
Object deepCopy(Object value, EntityMode entityMode, SessionFactoryImplementor factory)
Object fromXMLNode(Node xml, Mapping factory)
Object get(ResultSet rs, String name)
int getHashCode(Object x, EntityMode entityMode, SessionFactoryImplementor session)
Get a hash code, consistent with persistence "equality".
Class getReturnedClass()
boolean isEqual(Object x, Object y, EntityMode entityMode, SessionFactoryImplementor factory)
Compare two instances of the class mapped by this type for persistence "equality" (equality of persistent state).
boolean isMutable()
Object replace(Object original, Object target, SessionImplementor session, Object owner, Map copyCache)
void set(PreparedStatement st, Object value, int index, SessionImplementor session)
void setParameterValues(Properties parameters)
Gets called by Hibernate to pass the configured type parameters to the implementation.
void setToXMLNode(Node node, Object value, SessionFactoryImplementor factory)
int[] sqlTypes(Mapping mapping)
boolean[] toColumnNullness(Object value, Mapping mapping)
String toLoggableString(Object value, SessionFactoryImplementor factory)
[Expand]
Inherited Methods
From class org.hibernate.type.AbstractLobType
From class org.hibernate.type.AbstractType
From class java.lang.Object
From interface org.hibernate.type.Type
From interface org.hibernate.usertype.ParameterizedType

Constants

public static final String CLASS_NAME

class name of the serialisable class

Constant Value: "classname"

Public Constructors

public SerializableToBlobType ()

Public Methods

public Object deepCopy (Object value, EntityMode entityMode, SessionFactoryImplementor factory)

public Object fromXMLNode (Node xml, Mapping factory)

public Object get (ResultSet rs, String name)

Throws
SQLException

public int getHashCode (Object x, EntityMode entityMode, SessionFactoryImplementor session)

Get a hash code, consistent with persistence "equality". Again for most types the normal usage is to delegate to the value's #hashCode.

Parameters
x The value for which to retrieve a hash code
entityMode The entity mode of the value.
session The session factory
Returns
  • The hash code

public Class getReturnedClass ()

public boolean isEqual (Object x, Object y, EntityMode entityMode, SessionFactoryImplementor factory)

Compare two instances of the class mapped by this type for persistence "equality" (equality of persistent state).

This should always equate to some form of comparison of the value's internal state. As an example, for something like a date the comparison should be based on its internal "time" state based on the specific portion it is meant to represent (timestamp, date, time).

Parameters
x The first value
y The second value
entityMode The entity mode of the values.
factory The session factory
Returns
  • True if there are considered equal (see discussion above).

public boolean isMutable ()

public Object replace (Object original, Object target, SessionImplementor session, Object owner, Map copyCache)

public void set (PreparedStatement st, Object value, int index, SessionImplementor session)

Throws
SQLException

public void setParameterValues (Properties parameters)

Gets called by Hibernate to pass the configured type parameters to the implementation.

public void setToXMLNode (Node node, Object value, SessionFactoryImplementor factory)

public int[] sqlTypes (Mapping mapping)

public boolean[] toColumnNullness (Object value, Mapping mapping)

public String toLoggableString (Object value, SessionFactoryImplementor factory)