Home » Spring-Framework-090522 » org.springframework » orm » hibernate » support » [javadoc | source]
org.springframework.orm.hibernate.support
abstract public class: AbstractLobType [javadoc | source]
java.lang.Object
   org.springframework.orm.hibernate.support.AbstractLobType

All Implemented Interfaces:
    net.sf.hibernate.UserType

Direct Known Subclasses:
    BlobSerializableType, ClobStringType, BlobByteArrayType

Abstract base class for Hibernate UserType implementations that map to LOBs. Retrieves the LobHandler to use from LocalSessionFactoryBean at config time.

For writing LOBs, either an active Spring transaction synchronization or an active JTA transaction (with "jtaTransactionManager" specified on LocalSessionFactoryBean) is required.

Offers template methods for setting parameters and getting result values, passing in the LobHandler or LobCreator to use.

Field Summary
public static final  int LOB_CREATOR_SYNCHRONIZATION_ORDER    Order value for TransactionSynchronization objects that clean up LobCreators. Return SessionFactoryUtils.SESSION_SYNCHRONIZATION_ORDER - 100 to execute LobCreator cleanup before Hibernate Session and JDBC Connection cleanup, if any.
    Also see:
    org.springframework.orm.hibernate.SessionFactoryUtils#SESSION_SYNCHRONIZATION_ORDER
 
protected final  Log logger     
Constructor:
 protected AbstractLobType() 
 protected AbstractLobType(LobHandler lobHandler,
    TransactionManager jtaTransactionManager) 
    Constructor used for testing: takes an explicit LobHandler and an explicit JTA TransactionManager (can be null).
Method from org.springframework.orm.hibernate.support.AbstractLobType Summary:
deepCopy,   equals,   isMutable,   nullSafeGet,   nullSafeGetInternal,   nullSafeSet,   nullSafeSetInternal
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.orm.hibernate.support.AbstractLobType Detail:
 public Object deepCopy(Object value) throws HibernateException 
    This implementation returns the passed-in value as-is.
 public boolean equals(Object x,
    Object y) throws HibernateException 
    This implementation delegates to the Hibernate EqualsHelper.
 public boolean isMutable() 
    This implementation returns false.
 public final Object nullSafeGet(ResultSet rs,
    String[] names,
    Object owner) throws HibernateException, SQLException 
    This implementation delegates to nullSafeGetInternal, passing in the LobHandler of this type.
 abstract protected Object nullSafeGetInternal(ResultSet rs,
    int index,
    LobHandler lobHandler) throws SQLException, IOException, HibernateException
    Template method to extract a value from the given result set.
 public final  void nullSafeSet(PreparedStatement st,
    Object value,
    int index) throws HibernateException, SQLException 
    This implementation delegates to nullSafeSetInternal, passing in a transaction-synchronized LobCreator for the LobHandler of this type.
 abstract protected  void nullSafeSetInternal(PreparedStatement ps,
    int index,
    Object value,
    LobCreator lobCreator) throws SQLException, IOException, HibernateException
    Template method to set the given parameter value on the given statement.