类 AbstractLobType
- java.lang.Object
- org.springframework.orm.hibernate3.support.AbstractLobType
- 所有已实现的接口:
UserType
@Deprecated public abstract class AbstractLobType extends Object implements UserType
已过时。as of Spring 4.3, in favor of Hibernate 4.x/5.xAbstract 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 or a Hibernate TransactionManagerLookup configured through the corresponding Hibernate property) is required.
Offers template methods for setting parameters and getting result values, passing in the LobHandler or LobCreator to use.
构造器概要
构造器 限定符 构造器 说明 protected
AbstractLobType()
已过时。Constructor used by Hibernate: fetches config-time LobHandler and config-time JTA TransactionManager from LocalSessionFactoryBean.protected
AbstractLobType(LobHandler lobHandler, TransactionManager jtaTransactionManager)
已过时。Constructor used for testing: takes an explicit LobHandler and an explicit JTA TransactionManager (can benull
).
方法概要
所有方法 实例方法 抽象方法 具体方法 已过时的方法 修饰符和类型 方法 说明 Object
assemble(Serializable cached, Object owner)
已过时。This implementation returns the passed-in value as-is.Object
deepCopy(Object value)
已过时。This implementation returns the passed-in value as-is.Serializable
disassemble(Object value)
已过时。This implementation returns the passed-in value as-is.boolean
equals(Object x, Object y)
已过时。This implementation delegates to the Hibernate EqualsHelper.int
hashCode(Object x)
已过时。This implementation returns the hashCode of the given objectz.boolean
isMutable()
已过时。This implementation returns false.Object
nullSafeGet(ResultSet rs, String[] names, Object owner)
已过时。protected abstract Object
nullSafeGetInternal(ResultSet rs, String[] names, Object owner, LobHandler lobHandler)
已过时。Template method to extract a value from the given result set.void
nullSafeSet(PreparedStatement st, Object value, int index)
已过时。protected abstract void
nullSafeSetInternal(PreparedStatement ps, int index, Object value, LobCreator lobCreator)
已过时。Template method to set the given parameter value on the given statement.Object
replace(Object original, Object target, Object owner)
已过时。This implementation returns the passed-in original as-is.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 org.hibernate.usertype.UserType
nullSafeGet, nullSafeSet, returnedClass, sqlTypes
构造器详细资料
AbstractLobType
protected AbstractLobType()
已过时。Constructor used by Hibernate: fetches config-time LobHandler and config-time JTA TransactionManager from LocalSessionFactoryBean.
AbstractLobType
protected AbstractLobType(LobHandler lobHandler, TransactionManager jtaTransactionManager)
已过时。Constructor used for testing: takes an explicit LobHandler and an explicit JTA TransactionManager (can benull
).
方法详细资料
isMutable
public boolean isMutable()
已过时。This implementation returns false.
equals
public boolean equals(Object x, Object y) throws HibernateException
已过时。This implementation delegates to the Hibernate EqualsHelper.- 指定者:
equals
在接口中UserType
- 抛出:
HibernateException
- 另请参阅:
EqualsHelper.equals(java.lang.Object, java.lang.Object)
hashCode
public int hashCode(Object x) throws HibernateException
已过时。This implementation returns the hashCode of the given objectz.- 指定者:
hashCode
在接口中UserType
- 抛出:
HibernateException
deepCopy
public Object deepCopy(Object value) throws HibernateException
已过时。This implementation returns the passed-in value as-is.- 指定者:
deepCopy
在接口中UserType
- 抛出:
HibernateException
disassemble
public Serializable disassemble(Object value) throws HibernateException
已过时。This implementation returns the passed-in value as-is.- 指定者:
disassemble
在接口中UserType
- 抛出:
HibernateException
assemble
public Object assemble(Serializable cached, Object owner) throws HibernateException
已过时。This implementation returns the passed-in value as-is.- 指定者:
assemble
在接口中UserType
- 抛出:
HibernateException
replace
public Object replace(Object original, Object target, Object owner) throws HibernateException
已过时。This implementation returns the passed-in original as-is.- 指定者:
replace
在接口中UserType
- 抛出:
HibernateException
nullSafeGet
@Deprecated 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.
nullSafeSet
@Deprecated 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.
nullSafeGetInternal
protected abstract Object nullSafeGetInternal(ResultSet rs, String[] names, Object owner, LobHandler lobHandler) throws SQLException, IOException, HibernateException
已过时。Template method to extract a value from the given result set.- 参数:
rs
- the ResultSet to extract fromnames
- the column namesowner
- the containing entitylobHandler
- the LobHandler to use- 返回:
- the extracted value
- 抛出:
SQLException
- if thrown by JDBC methodsIOException
- if thrown by streaming methodsHibernateException
- in case of any other exceptions
nullSafeSetInternal
protected abstract 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.- 参数:
ps
- the PreparedStatement to set onindex
- the statement parameter indexvalue
- the value to setlobCreator
- the LobCreator to use- 抛出:
SQLException
- if thrown by JDBC methodsIOException
- if thrown by streaming methodsHibernateException
- in case of any other exceptions