|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibatis.sqlmap.engine.type.BaseTypeHandler org.springframework.orm.ibatis.support.AbstractLobTypeHandler org.springframework.orm.ibatis.support.ClobStringTypeHandler
public class ClobStringTypeHandler
iBATIS TypeHandler implementation for Strings that get mapped to CLOBs. Retrieves the LobHandler to use from SqlMapClientFactoryBean at config time.
Particularly useful for storing Strings with more than 4000 characters in an Oracle database (only possible via CLOBs), in combination with OracleLobHandler.
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.
SqlMapClientFactoryBean.setLobHandler(org.springframework.jdbc.support.lob.LobHandler)
Field Summary |
---|
Fields inherited from class org.springframework.orm.ibatis.support.AbstractLobTypeHandler |
---|
LOB_CREATOR_SYNCHRONIZATION_ORDER |
Constructor Summary | |
---|---|
|
ClobStringTypeHandler()
Constructor used by iBATIS: fetches config-time LobHandler from SqlMapClientFactoryBean. |
protected |
ClobStringTypeHandler(LobHandler lobHandler)
Constructor used for testing: takes an explicit LobHandler. |
Method Summary | |
---|---|
protected Object |
getResultInternal(ResultSet rs,
int index,
LobHandler lobHandler)
Template method to extract a value from the given result set. |
protected void |
setParameterInternal(PreparedStatement ps,
int index,
Object value,
String jdbcType,
LobCreator lobCreator)
Template method to set the given value on the given statement. |
Object |
valueOf(String s)
|
Methods inherited from class org.springframework.orm.ibatis.support.AbstractLobTypeHandler |
---|
getResult, getResult, getResult, setParameter |
Methods inherited from class com.ibatis.sqlmap.engine.type.BaseTypeHandler |
---|
equals |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClobStringTypeHandler()
SqlMapClientFactoryBean.getConfigTimeLobHandler()
protected ClobStringTypeHandler(LobHandler lobHandler)
Method Detail |
---|
protected void setParameterInternal(PreparedStatement ps, int index, Object value, String jdbcType, LobCreator lobCreator) throws SQLException
AbstractLobTypeHandler
setParameterInternal
in class AbstractLobTypeHandler
ps
- the PreparedStatement to set onindex
- the statement parameter indexvalue
- the parameter value to setjdbcType
- the JDBC type of the parameterlobCreator
- the LobCreator to use
SQLException
- if thrown by JDBC methodsprotected Object getResultInternal(ResultSet rs, int index, LobHandler lobHandler) throws SQLException
AbstractLobTypeHandler
getResultInternal
in class AbstractLobTypeHandler
rs
- the ResultSet to extract fromindex
- the index in the ResultSetlobHandler
- the LobHandler to use
SQLException
- if thrown by JDBC methodspublic Object valueOf(String s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |