public class BlobByteArrayTypeHandler extends AbstractLobTypeHandler
Can also be defined in generic iBATIS 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.
org.springframework.orm.ibatis.SqlMapClientFactoryBean#setLobHandlerLOB_CREATOR_SYNCHRONIZATION_ORDER| Modifier | Constructor and Description |
|---|---|
|
BlobByteArrayTypeHandler()
Constructor used by iBATIS: fetches config-time LobHandler from
SqlMapClientFactoryBean.
|
protected |
BlobByteArrayTypeHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler)
Constructor used for testing: takes an explicit LobHandler.
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
getResultInternal(ResultSet rs,
int index,
org.springframework.jdbc.support.lob.LobHandler lobHandler)
Template method to extract a value from the given result set.
|
protected void |
setParameterInternal(PreparedStatement ps,
int index,
Object value,
String jdbcType,
org.springframework.jdbc.support.lob.LobCreator lobCreator)
Template method to set the given value on the given statement.
|
Object |
valueOf(Object s)
Converts the String to the type that this handler deals with
|
getResult, getResult, getResult, setParameterpublic BlobByteArrayTypeHandler()
org.springframework.orm.ibatis.SqlMapClientFactoryBean#getConfigTimeLobHandlerprotected BlobByteArrayTypeHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler)
protected void setParameterInternal(PreparedStatement ps, int index, Object value, String jdbcType, org.springframework.jdbc.support.lob.LobCreator lobCreator) throws SQLException
AbstractLobTypeHandlersetParameterInternal in class AbstractLobTypeHandlerps - the PreparedStatement to set onindex - the statement parameter indexvalue - the parameter value to setjdbcType - the JDBC type of the parameterlobCreator - the LobCreator to useSQLException - if thrown by JDBC methodsprotected Object getResultInternal(ResultSet rs, int index, org.springframework.jdbc.support.lob.LobHandler lobHandler) throws SQLException
AbstractLobTypeHandlergetResultInternal in class AbstractLobTypeHandlerrs - the ResultSet to extract fromindex - the index in the ResultSetlobHandler - the LobHandler to useSQLException - if thrown by JDBC methodsCopyright © 2084–2018 dukeware.com. All rights reserved.