Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.type
Class SerializableToBlobType

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

All Implemented Interfaces:
  Serializable, Type, ParameterizedType

    public class SerializableToBlobType

extends AbstractLobType
implements ParameterizedType

Author:
  Emmanuel Bernard
See Also:
  Serialized Form

Field Summary
`static String` | `CLASS_NAME` class name of the serialisable class

Constructor Summary
`SerializableToBlobType()`

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

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`

Field Detail

### CLASS_NAME

    public static final String CLASS_NAME

  class name of the serialisable class

  See Also:
    Constant Field Values

Constructor Detail

### SerializableToBlobType

    public SerializableToBlobType()

Method Detail

### sqlTypes

    public int[] sqlTypes(Mapping mapping)
                   throws MappingException

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

  Specified by:
    `sqlTypes` in interface `Type`
  Parameters:
    `mapping` - The mapping object :/
  Returns:
    The JDBC type codes.
  Throws:
    `MappingException` - Generally indicates an issue accessing the passed mapping object.

### getReturnedClass

    public Class getReturnedClass()

  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.

  Specified by:
    `getReturnedClass` in interface `Type`
  Returns:
    The java type class handled by this type.

### isEqual

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

  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 session)

  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.
    `session` - The session factory
  Returns:
    The hash code

### get

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

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

### set

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

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

### setToXMLNode

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

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

  Specified by:
    `setToXMLNode` in interface `Type`
  Throws:
    `HibernateException`

### toLoggableString

    public String toLoggableString(Object value,
                                   SessionFactoryImplementor factory)
                            throws HibernateException

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

  Specified by:
    `toLoggableString` in interface `Type`
  Returns:
    String
  Throws:
    `HibernateException`

### fromXMLNode

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

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

  Specified by:
    `fromXMLNode` in interface `Type`
  Returns:
    an instance of the type
  Throws:
    `HibernateException`

### deepCopy

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

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

  Specified by:
    `deepCopy` in interface `Type`
  Parameters:
    `value` - generally a collection element or entity field
  Returns:
    Object a copy
  Throws:
    `HibernateException`

### isMutable

    public boolean isMutable()

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

  Specified by:
    `isMutable` in interface `Type`
  Returns:
    boolean

### replace

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

  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.

  Specified by:
    `replace` in interface `Type`
  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)

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

  Specified by:
    `toColumnNullness` in interface `Type`
  Parameters:
    `value` - an instance of the type

### setParameterValues

    public void setParameterValues(Properties parameters)

  Description copied from interface: `ParameterizedType`
  Gets called by Hibernate to pass the configured type parameters to the implementation.

  Specified by:
    `setParameterValues` in interface `ParameterizedType`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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