Package org.alfresco.ibatis
Class SerializableTypeHandler
java.lang.Object
org.alfresco.ibatis.SerializableTypeHandler
- All Implemented Interfaces:
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 ClassesModifier and TypeClassDescriptionstatic classMarker exception to allow deserialization issues to be dealt with by calling code.static classMarker exception to allow serialization issues to be dealt with by calling code. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetResult(CallableStatement cs, int columnIndex) static intvoidsetParameter(PreparedStatement ps, int i, Object parameter, org.apache.ibatis.type.JdbcType jdbcType) static voidsetSerializableType(int serializableType)
-
Field Details
-
DEFAULT_SERIALIZABLE_TYPE
public static final int DEFAULT_SERIALIZABLE_TYPE- See Also:
-
-
Constructor Details
-
SerializableTypeHandler
public SerializableTypeHandler()
-
-
Method Details
-
setSerializableType
public static void setSerializableType(int serializableType) - See Also:
-
getSerializableType
public static int getSerializableType()- Returns:
- Returns the SQL type to use for serializable columns
-
getResult
- Specified by:
getResultin interfaceorg.apache.ibatis.type.TypeHandler- Throws:
SerializableTypeHandler.DeserializationException- if the object could not be deserializedSQLException
-
getResult
- 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
- Specified by:
getResultin interfaceorg.apache.ibatis.type.TypeHandler- Throws:
SQLException
-
valueOf
- Returns:
- Returns the value given
-