@Deprecated public abstract class AbstractLobTypeHandler extends BaseTypeHandler
For writing LOBs, an active Spring transaction synchronization is required, to be able to register a synchronization that closes the LobCreator.
Offers template methods for setting parameters and getting result values, passing in the LobHandler or LobCreator to use.
LobHandler,
LobCreator,
SqlMapClientFactoryBean.setLobHandler(org.springframework.jdbc.support.lob.LobHandler)| Modifier and Type | Field and Description |
|---|---|
static int |
LOB_CREATOR_SYNCHRONIZATION_ORDER
Deprecated.
Order value for TransactionSynchronization objects that clean up LobCreators.
|
| Modifier | Constructor and Description |
|---|---|
|
AbstractLobTypeHandler()
Deprecated.
Constructor used by iBATIS: fetches config-time LobHandler from
SqlMapClientFactoryBean.
|
protected |
AbstractLobTypeHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler)
Deprecated.
Constructor used for testing: takes an explicit LobHandler.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getResult(java.sql.CallableStatement cs,
int columnIndex)
Deprecated.
This implementation always throws a SQLException:
retrieving LOBs from a CallableStatement is not supported.
|
java.lang.Object |
getResult(java.sql.ResultSet rs,
int columnIndex)
Deprecated.
This implementation delegates to getResultInternal,
passing in the LobHandler of this type.
|
java.lang.Object |
getResult(java.sql.ResultSet rs,
java.lang.String columnName)
Deprecated.
This implementation delegates to the getResult version
that takes a column index.
|
protected abstract java.lang.Object |
getResultInternal(java.sql.ResultSet rs,
int index,
org.springframework.jdbc.support.lob.LobHandler lobHandler)
Deprecated.
Template method to extract a value from the given result set.
|
void |
setParameter(java.sql.PreparedStatement ps,
int i,
java.lang.Object parameter,
java.lang.String jdbcType)
Deprecated.
This implementation delegates to setParameterInternal,
passing in a transaction-synchronized LobCreator for the
LobHandler of this type.
|
protected abstract void |
setParameterInternal(java.sql.PreparedStatement ps,
int index,
java.lang.Object value,
java.lang.String jdbcType,
org.springframework.jdbc.support.lob.LobCreator lobCreator)
Deprecated.
Template method to set the given value on the given statement.
|
equalsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitvalueOfpublic static final int LOB_CREATOR_SYNCHRONIZATION_ORDER
DataSourceUtils.CONNECTION_SYNCHRONIZATION_ORDER,
Constant Field Valuespublic AbstractLobTypeHandler()
protected AbstractLobTypeHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler)
public final void setParameter(java.sql.PreparedStatement ps,
int i,
java.lang.Object parameter,
java.lang.String jdbcType)
throws java.sql.SQLException
java.sql.SQLExceptionsetParameterInternal(java.sql.PreparedStatement, int, java.lang.Object, java.lang.String, org.springframework.jdbc.support.lob.LobCreator)public final java.lang.Object getResult(java.sql.ResultSet rs,
java.lang.String columnName)
throws java.sql.SQLException
java.sql.SQLExceptiongetResult(java.sql.ResultSet, String),
ResultSet.findColumn(java.lang.String)public final java.lang.Object getResult(java.sql.ResultSet rs,
int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptiongetResultInternal(java.sql.ResultSet, int, org.springframework.jdbc.support.lob.LobHandler)public java.lang.Object getResult(java.sql.CallableStatement cs,
int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionprotected abstract void setParameterInternal(java.sql.PreparedStatement ps,
int index,
java.lang.Object value,
java.lang.String jdbcType,
org.springframework.jdbc.support.lob.LobCreator lobCreator)
throws java.sql.SQLException,
java.io.IOException
ps - the PreparedStatement to set onindex - the statement parameter indexvalue - the parameter value to setjdbcType - the JDBC type of the parameterlobCreator - the LobCreator to usejava.sql.SQLException - if thrown by JDBC methodsjava.io.IOException - if thrown by streaming methodsprotected abstract java.lang.Object getResultInternal(java.sql.ResultSet rs,
int index,
org.springframework.jdbc.support.lob.LobHandler lobHandler)
throws java.sql.SQLException,
java.io.IOException
rs - the ResultSet to extract fromindex - the index in the ResultSetlobHandler - the LobHandler to usejava.sql.SQLException - if thrown by JDBC methodsjava.io.IOException - if thrown by streaming methods