public class BlobByteArrayType extends AbstractLobType
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.
LocalSessionFactoryBean.setLobHandler(org.springframework.jdbc.support.lob.LobHandler)logger| Modifier | Constructor and Description |
|---|---|
|
BlobByteArrayType()
Constructor used by Hibernate: fetches config-time LobHandler and
config-time JTA TransactionManager from LocalSessionFactoryBean.
|
protected |
BlobByteArrayType(LobHandler lobHandler,
TransactionManager jtaTransactionManager)
Constructor used for testing: takes an explicit LobHandler
and an explicit JTA TransactionManager (can be
null). |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
deepCopy(java.lang.Object value)
This implementation returns the passed-in value as-is.
|
boolean |
equals(java.lang.Object x,
java.lang.Object y)
This implementation delegates to the Hibernate EqualsHelper.
|
boolean |
isMutable()
This implementation returns false.
|
protected java.lang.Object |
nullSafeGetInternal(java.sql.ResultSet rs,
java.lang.String[] names,
java.lang.Object owner,
LobHandler lobHandler)
Template method to extract a value from the given result set.
|
protected void |
nullSafeSetInternal(java.sql.PreparedStatement ps,
int index,
java.lang.Object value,
LobCreator lobCreator)
Template method to set the given parameter value on the given statement.
|
java.lang.Class |
returnedClass() |
int[] |
sqlTypes() |
assemble, disassemble, hashCode, nullSafeGet, nullSafeSet, replaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnullSafeGet, nullSafeSetpublic BlobByteArrayType()
protected BlobByteArrayType(LobHandler lobHandler, TransactionManager jtaTransactionManager)
null).public int[] sqlTypes()
public java.lang.Class returnedClass()
public boolean isMutable()
AbstractLobTypeisMutable in interface UserTypeisMutable in class AbstractLobTypepublic boolean equals(java.lang.Object x,
java.lang.Object y)
AbstractLobTypeequals in interface UserTypeequals in class AbstractLobTypeEqualsHelper.equals(java.lang.Object, java.lang.Object)public java.lang.Object deepCopy(java.lang.Object value)
AbstractLobTypedeepCopy in interface UserTypedeepCopy in class AbstractLobTypeprotected java.lang.Object nullSafeGetInternal(java.sql.ResultSet rs,
java.lang.String[] names,
java.lang.Object owner,
LobHandler lobHandler)
throws java.sql.SQLException
AbstractLobTypenullSafeGetInternal in class AbstractLobTypers - the ResultSet to extract fromnames - the column namesowner - the containing entitylobHandler - the LobHandler to usejava.sql.SQLException - if thrown by JDBC methodsprotected void nullSafeSetInternal(java.sql.PreparedStatement ps,
int index,
java.lang.Object value,
LobCreator lobCreator)
throws java.sql.SQLException
AbstractLobTypenullSafeSetInternal in class AbstractLobTypeps - the PreparedStatement to set onindex - the statement parameter indexvalue - the value to setlobCreator - the LobCreator to usejava.sql.SQLException - if thrown by JDBC methods