java.lang.Object | ||
↳ | BaseTypeHandler | |
↳ | org.springframework.orm.ibatis.support.AbstractLobTypeHandler |
Known Direct Subclasses |
Abstract base class for iBATIS TypeHandler implementations that map to LOBs. Retrieves the LobHandler to use from SqlMapClientFactoryBean at config time.
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.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | LOB_CREATOR_SYNCHRONIZATION_ORDER | Order value for TransactionSynchronization objects that clean up LobCreators. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructor used by iBATIS: fetches config-time LobHandler from
SqlMapClientFactoryBean.
|
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructor used for testing: takes an explicit LobHandler.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This implementation delegates to the getResult version
that takes a column index.
| |||||||||||
This implementation always throws a SQLException:
retrieving LOBs from a CallableStatement is not supported.
| |||||||||||
This implementation delegates to getResultInternal,
passing in the LobHandler of this type.
| |||||||||||
This implementation delegates to setParameterInternal,
passing in a transaction-synchronized LobCreator for the
LobHandler of this type.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Template method to extract a value from the given result set.
| |||||||||||
Template method to set the given value on the given statement.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Order value for TransactionSynchronization objects that clean up LobCreators. Return DataSourceUtils.#CONNECTION_SYNCHRONIZATION_ORDER - 100 to execute LobCreator cleanup before JDBC Connection cleanup, if any.
Constructor used by iBATIS: fetches config-time LobHandler from SqlMapClientFactoryBean.
Constructor used for testing: takes an explicit LobHandler.
This implementation delegates to the getResult version that takes a column index.
SQLException |
---|
This implementation always throws a SQLException: retrieving LOBs from a CallableStatement is not supported.
SQLException |
---|
This implementation delegates to getResultInternal, passing in the LobHandler of this type.
SQLException |
---|
This implementation delegates to setParameterInternal, passing in a transaction-synchronized LobCreator for the LobHandler of this type.
SQLException |
---|
Template method to extract a value from the given result set.
rs | the ResultSet to extract from |
---|---|
index | the index in the ResultSet |
lobHandler | the LobHandler to use |
SQLException | if thrown by JDBC methods |
---|---|
IOException | if thrown by streaming methods |
Template method to set the given value on the given statement.
ps | the PreparedStatement to set on |
---|---|
index | the statement parameter index |
value | the parameter value to set |
jdbcType | the JDBC type of the parameter |
lobCreator | the LobCreator to use |
SQLException | if thrown by JDBC methods |
---|---|
IOException | if thrown by streaming methods |