Class SQLClobTypeHandler
- java.lang.Object
-
- org.apache.ibatis.type.TypeReference<T>
-
- org.apache.ibatis.type.BaseTypeHandler<Object>
-
- org.ametys.plugins.contentio.synchronize.impl.typehandler.SQLClobTypeHandler
-
- All Implemented Interfaces:
org.apache.ibatis.type.TypeHandler<Object>
public class SQLClobTypeHandler extends org.apache.ibatis.type.BaseTypeHandler<Object>
Handle Clob SQL type to return string value
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.Logger
__logger
-
Constructor Summary
Constructors Constructor Description SQLClobTypeHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
_transformClobToString(Clob clob)
Transform CLOB value to String value.Object
getNullableResult(CallableStatement cs, int columnIndex)
Object
getNullableResult(ResultSet rs, int columnIndex)
Object
getNullableResult(ResultSet rs, String columnName)
void
setNonNullParameter(PreparedStatement ps, int i, Object parameter, org.apache.ibatis.type.JdbcType jdbcType)
-
-
-
Field Detail
-
__logger
private static org.slf4j.Logger __logger
-
-
Constructor Detail
-
SQLClobTypeHandler
public SQLClobTypeHandler()
-
-
Method Detail
-
setNonNullParameter
public void setNonNullParameter(PreparedStatement ps, int i, Object parameter, org.apache.ibatis.type.JdbcType jdbcType) throws SQLException
- Specified by:
setNonNullParameter
in classorg.apache.ibatis.type.BaseTypeHandler<Object>
- Throws:
SQLException
-
getNullableResult
public Object getNullableResult(ResultSet rs, String columnName) throws SQLException
- Specified by:
getNullableResult
in classorg.apache.ibatis.type.BaseTypeHandler<Object>
- Throws:
SQLException
-
getNullableResult
public Object getNullableResult(ResultSet rs, int columnIndex) throws SQLException
- Specified by:
getNullableResult
in classorg.apache.ibatis.type.BaseTypeHandler<Object>
- Throws:
SQLException
-
getNullableResult
public Object getNullableResult(CallableStatement cs, int columnIndex) throws SQLException
- Specified by:
getNullableResult
in classorg.apache.ibatis.type.BaseTypeHandler<Object>
- Throws:
SQLException
-
_transformClobToString
protected String _transformClobToString(Clob clob) throws SQLException
Transform CLOB value to String value.- Parameters:
clob
- the clob- Returns:
- the CLOB transformed to String.
- Throws:
SQLException
- if an error occurred
-
-