## org.hibernate.type
Class ByteArrayBlobType

    java.lang.Object
      org.hibernate.type.AbstractType
          org.hibernate.type.AbstractLobType
              org.hibernate.type.ByteArrayBlobType

All Implemented Interfaces:
  Serializable, Type

Direct Known Subclasses:
  PrimitiveByteArrayBlobType

Deprecated. replaced by `WrappedMaterializedBlobType`

    @Deprecated
    public class ByteArrayBlobType

extends AbstractLobType

Map a Byte[] into a Blob Experimental

Author:
  Emmanuel Bernard
See Also:
  Serialized Form

Constructor Summary
`ByteArrayBlobType()` Deprecated.

Method Summary
`Object` `deepCopy(Object value, EntityMode entityMode, SessionFactoryImplementor factory)` Deprecated. Return a deep copy of the persistent state, stopping at entities and at collections.
`Object` `fromXMLNode(org.dom4j.Node xml, Mapping factory)` Deprecated. Parse the XML representation of an instance.
`protected Object` `get(ResultSet rs, String name)` Deprecated.
`int` `getHashCode(Object x, EntityMode entityMode, SessionFactoryImplementor factory)` Deprecated. Get a hash code, consistent with persistence "equality".
`Class` `getReturnedClass()` Deprecated. The class returned by `Type.nullSafeGet(java.sql.ResultSet, java.lang.String[], org.hibernate.engine.SessionImplementor, java.lang.Object)` methods.
`boolean` `isEqual(Object x, Object y, EntityMode entityMode, SessionFactoryImplementor factory)` Deprecated. Compare two instances of the class mapped by this type for persistence "equality" (equality of persistent state).
`boolean` `isMutable()` Deprecated. Are objects of this type mutable.
`Object` `replace(Object original, Object target, SessionImplementor session, Object owner, Map copyCache)` Deprecated. 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.
`protected void` `set(PreparedStatement st, Object value, int index, SessionImplementor session)` Deprecated.
`void` `setToXMLNode(org.dom4j.Node node, Object value, SessionFactoryImplementor factory)` Deprecated. A representation of the value to be embedded in an XML element.
`int[]` `sqlTypes(Mapping mapping)` Deprecated. Return the JDBC types codes (per `Types`) for the columns mapped by this type.
`boolean[]` `toColumnNullness(Object value, Mapping mapping)` Deprecated. Given an instance of the type, return an array of boolean, indicating which mapped columns would be null.
`String` `toLoggableString(Object value, SessionFactoryImplementor factory)` Deprecated. A representation of the value to be embedded in a log file.
`String` `toString(Object val)` Deprecated.
`protected byte[]` `unWrap(Object bytes)` Deprecated.
`protected Object` `wrap(byte[] bytes)` Deprecated.

Methods inherited from class org.hibernate.type.AbstractLobType
`getColumnSpan, getHashCode, getName, isDirty, isEqual, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet`

Methods inherited from class org.hibernate.type.AbstractType
`assemble, beforeAssemble, compare, disassemble, getSemiResolvedType, hydrate, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isEntityType, isModified, isSame, isXMLElement, replace, replaceNode, resolve, semiResolve`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ByteArrayBlobType

    public ByteArrayBlobType()

  Deprecated.

Method Detail

### sqlTypes

    public int[] sqlTypes(Mapping mapping)

  Deprecated.
  Description copied from interface: `Type`
  Return the JDBC types codes (per `Types`) for the columns mapped by this type.

  Parameters:
    `mapping` - The mapping object :/
  Returns:
    The JDBC type codes.

### isEqual

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

  Deprecated.
  Description copied from interface: `Type`
  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).

  Specified by:
    `isEqual` in interface `Type`
  Overrides:
    `isEqual` in class `AbstractType`
  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).

### getHashCode

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

  Deprecated.
  Description copied from interface: `Type`
  Get a hash code, consistent with persistence "equality". Again for most types the normal usage is to delegate to the value's `#hashCode`.

  Specified by:
    `getHashCode` in interface `Type`
  Overrides:
    `getHashCode` in class `AbstractType`
  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

### deepCopy

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

  Deprecated.
  Description copied from interface: `Type`
  Return a deep copy of the persistent state, stopping at entities and at collections.

  Parameters:
    `value` - generally a collection element or entity field
  Returns:
    Object a copy
  Throws:
    `HibernateException`

### getReturnedClass

    public Class getReturnedClass()

  Deprecated.
  Description copied from interface: `Type`
  The class returned by `Type.nullSafeGet(java.sql.ResultSet, java.lang.String[], org.hibernate.engine.SessionImplementor, java.lang.Object)` methods. This is used to establish the class of an array of this type.

  Returns:
    The java type class handled by this type.

### get

    protected Object get(ResultSet rs,
                         String name)
                  throws SQLException

  Deprecated.
  Specified by:
    `get` in class `AbstractLobType`
  Throws:
    `SQLException`

### set

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

  Deprecated.
  Specified by:
    `set` in class `AbstractLobType`
  Throws:
    `SQLException`

### setToXMLNode

    public void setToXMLNode(org.dom4j.Node node,
                             Object value,
                             SessionFactoryImplementor factory)
                      throws HibernateException

  Deprecated.
  Description copied from interface: `Type`
  A representation of the value to be embedded in an XML element.

  Throws:
    `HibernateException`

### toString

    public String toString(Object val)

  Deprecated.

### toLoggableString

    public String toLoggableString(Object value,
                                   SessionFactoryImplementor factory)

  Deprecated.
  Description copied from interface: `Type`
  A representation of the value to be embedded in a log file.

  Returns:
    String

### fromXMLNode

    public Object fromXMLNode(org.dom4j.Node xml,
                              Mapping factory)
                       throws HibernateException

  Deprecated.
  Description copied from interface: `Type`
  Parse the XML representation of an instance.

  Returns:
    an instance of the type
  Throws:
    `HibernateException`

### wrap

    protected Object wrap(byte[] bytes)

  Deprecated.

### unWrap

    protected byte[] unWrap(Object bytes)

  Deprecated.

### isMutable

    public boolean isMutable()

  Deprecated.
  Description copied from interface: `Type`
  Are objects of this type mutable. (With respect to the referencing object ... entities and collections are considered immutable because they manage their own internal state.)

  Returns:
    boolean

### replace

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

  Deprecated.
  Description copied from interface: `Type`
  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. For immutable objects, or null values, it is safe to simply return the first parameter. For mutable objects, it is safe to return a copy of the first parameter. For objects with component values, it might make sense to recursively replace component values.

  Parameters:
    `original` - the value from the detached entity being merged
    `target` - the value in the managed entity
  Returns:
    the value to be merged
  Throws:
    `HibernateException`

### toColumnNullness

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

  Deprecated.
  Description copied from interface: `Type`
  Given an instance of the type, return an array of boolean, indicating which mapped columns would be null.

  Parameters:
    `value` - an instance of the type

Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.