public class

ByteArrayBlobType

extends AbstractLobType
java.lang.Object
   ↳ org.hibernate.type.AbstractType
     ↳ org.hibernate.type.AbstractLobType
       ↳ org.hibernate.type.ByteArrayBlobType
Known Direct Subclasses

This class is deprecated.
replaced by WrappedMaterializedBlobType

Class Overview

Map a Byte[] into a Blob Experimental

Summary

Public Constructors
ByteArrayBlobType()
Public Methods
Object deepCopy(Object value, EntityMode entityMode, SessionFactoryImplementor factory)
Object fromXMLNode(Node xml, Mapping factory)
int getHashCode(Object x, EntityMode entityMode, SessionFactoryImplementor factory)
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 setToXMLNode(Node node, Object value, SessionFactoryImplementor factory)
int[] sqlTypes(Mapping mapping)
boolean[] toColumnNullness(Object value, Mapping mapping)
String toLoggableString(Object value, SessionFactoryImplementor factory)
String toString(Object val)
Protected Methods
Object get(ResultSet rs, String name)
void set(PreparedStatement st, Object value, int index, SessionImplementor session)
byte[] unWrap(Object bytes)
Object wrap(byte[] bytes)
[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

Public Constructors

public ByteArrayBlobType ()

Public Methods

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

public Object fromXMLNode (Node xml, Mapping factory)

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

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.
factory 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 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)

public String toString (Object val)

Protected Methods

protected Object get (ResultSet rs, String name)

Throws
SQLException

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

Throws
SQLException

protected byte[] unWrap (Object bytes)

protected Object wrap (byte[] bytes)