Class BlobByteArrayType
- java.lang.Object
- org.springframework.orm.hibernate3.support.AbstractLobType
- org.springframework.orm.hibernate3.support.BlobByteArrayType
- All Implemented Interfaces:
UserType
@Deprecated public class BlobByteArrayType extends AbstractLobType
Deprecated.as of Spring 4.3, in favor of Hibernate 4.x/5.xHibernate UserType implementation for byte arrays that get mapped to BLOBs. Retrieves the LobHandler to use from LocalSessionFactoryBean at config time.Can also be defined in generic Hibernate mappings, as DefaultLobCreator will work with most JDBC-compliant database drivers. In this case, the field type does not have to be BLOB: For databases like MySQL and MS SQL Server, any large enough binary type will work.
- Since:
- 1.2
- Author:
- Juergen Hoeller
- See Also:
LocalSessionFactoryBean.setLobHandler(org.springframework.jdbc.support.lob.LobHandler)
Field Summary
Fields inherited from class org.springframework.orm.hibernate3.support.AbstractLobType
logger
Constructor Summary
Constructors Modifier Constructor Description BlobByteArrayType()
Deprecated.Constructor used by Hibernate: fetches config-time LobHandler and config-time JTA TransactionManager from LocalSessionFactoryBean.protected
BlobByteArrayType(LobHandler lobHandler, TransactionManager jtaTransactionManager)
Deprecated.Constructor used for testing: takes an explicit LobHandler and an explicit JTA TransactionManager (can benull
).
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Object
deepCopy(Object value)
Deprecated.This implementation returns the passed-in value as-is.boolean
equals(Object x, Object y)
Deprecated.This implementation delegates to the Hibernate EqualsHelper.boolean
isMutable()
Deprecated.This implementation returns false.protected Object
nullSafeGetInternal(ResultSet rs, String[] names, Object owner, LobHandler lobHandler)
Deprecated.Template method to extract a value from the given result set.protected void
nullSafeSetInternal(PreparedStatement ps, int index, Object value, LobCreator lobCreator)
Deprecated.Template method to set the given parameter value on the given statement.Class<?>
returnedClass()
Deprecated.int[]
sqlTypes()
Deprecated.Methods inherited from class org.springframework.orm.hibernate3.support.AbstractLobType
assemble, disassemble, hashCode, nullSafeGet, nullSafeSet, replace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.usertype.UserType
nullSafeGet, nullSafeSet
Constructor Detail
BlobByteArrayType
public BlobByteArrayType()
Deprecated.Constructor used by Hibernate: fetches config-time LobHandler and config-time JTA TransactionManager from LocalSessionFactoryBean.
BlobByteArrayType
protected BlobByteArrayType(LobHandler lobHandler, TransactionManager jtaTransactionManager)
Deprecated.Constructor used for testing: takes an explicit LobHandler and an explicit JTA TransactionManager (can benull
).
Method Detail
sqlTypes
public int[] sqlTypes()
Deprecated.
returnedClass
public Class<?> returnedClass()
Deprecated.
isMutable
public boolean isMutable()
Deprecated.Description copied from class:AbstractLobType
This implementation returns false.- Specified by:
isMutable
in interfaceUserType
- Overrides:
isMutable
in classAbstractLobType
equals
public boolean equals(Object x, Object y)
Deprecated.Description copied from class:AbstractLobType
This implementation delegates to the Hibernate EqualsHelper.- Specified by:
equals
in interfaceUserType
- Overrides:
equals
in classAbstractLobType
- See Also:
EqualsHelper.equals(java.lang.Object, java.lang.Object)
deepCopy
public Object deepCopy(Object value)
Deprecated.Description copied from class:AbstractLobType
This implementation returns the passed-in value as-is.- Specified by:
deepCopy
in interfaceUserType
- Overrides:
deepCopy
in classAbstractLobType
nullSafeGetInternal
protected Object nullSafeGetInternal(ResultSet rs, String[] names, Object owner, LobHandler lobHandler) throws SQLException
Deprecated.Description copied from class:AbstractLobType
Template method to extract a value from the given result set.- Specified by:
nullSafeGetInternal
in classAbstractLobType
- Parameters:
rs
- the ResultSet to extract fromnames
- the column namesowner
- the containing entitylobHandler
- the LobHandler to use- Returns:
- the extracted value
- Throws:
SQLException
- if thrown by JDBC methods
nullSafeSetInternal
protected void nullSafeSetInternal(PreparedStatement ps, int index, Object value, LobCreator lobCreator) throws SQLException
Deprecated.Description copied from class:AbstractLobType
Template method to set the given parameter value on the given statement.- Specified by:
nullSafeSetInternal
in classAbstractLobType
- Parameters:
ps
- the PreparedStatement to set onindex
- the statement parameter indexvalue
- the value to setlobCreator
- the LobCreator to use- Throws:
SQLException
- if thrown by JDBC methods