Package org.alfresco.ibatis
Class SerializableTypeHandler
- java.lang.Object
-
- org.alfresco.ibatis.SerializableTypeHandler
-
- All Implemented Interfaces:
org.apache.ibatis.type.TypeHandler
public class SerializableTypeHandler extends Object implements org.apache.ibatis.type.TypeHandler
MyBatis 3.x TypeHandler for java.io.Serializable to BLOB types.- Since:
- 4.0
- Author:
- Derek Hulley, janv
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSerializableTypeHandler.DeserializationExceptionMarker exception to allow deserialization issues to be dealt with by calling code.static classSerializableTypeHandler.SerializationExceptionMarker exception to allow serialization issues to be dealt with by calling code.
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_SERIALIZABLE_TYPE
-
Constructor Summary
Constructors Constructor Description SerializableTypeHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetResult(CallableStatement cs, int columnIndex)ObjectgetResult(ResultSet rs, int columnIndex)ObjectgetResult(ResultSet rs, String columnName)static intgetSerializableType()voidsetParameter(PreparedStatement ps, int i, Object parameter, org.apache.ibatis.type.JdbcType jdbcType)static voidsetSerializableType(int serializableType)ObjectvalueOf(String s)
-
-
-
Field Detail
-
DEFAULT_SERIALIZABLE_TYPE
public static final int DEFAULT_SERIALIZABLE_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setSerializableType
public static void setSerializableType(int serializableType)
- See Also:
Types
-
getSerializableType
public static int getSerializableType()
- Returns:
- Returns the SQL type to use for serializable columns
-
getResult
public Object getResult(ResultSet rs, String columnName) throws SQLException
- Specified by:
getResultin interfaceorg.apache.ibatis.type.TypeHandler- Throws:
SerializableTypeHandler.DeserializationException- if the object could not be deserializedSQLException
-
getResult
public Object getResult(ResultSet rs, int columnIndex) throws SQLException
- Specified by:
getResultin interfaceorg.apache.ibatis.type.TypeHandler- Throws:
SQLException
-
setParameter
public void setParameter(PreparedStatement ps, int i, Object parameter, org.apache.ibatis.type.JdbcType jdbcType) throws SQLException
- Specified by:
setParameterin interfaceorg.apache.ibatis.type.TypeHandler- Throws:
SQLException
-
getResult
public Object getResult(CallableStatement cs, int columnIndex) throws SQLException
- Specified by:
getResultin interfaceorg.apache.ibatis.type.TypeHandler- Throws:
SQLException
-
-