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 class
SerializableTypeHandler.DeserializationException
Marker exception to allow deserialization issues to be dealt with by calling code.static class
SerializableTypeHandler.SerializationException
Marker exception to allow serialization issues to be dealt with by calling code.
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_SERIALIZABLE_TYPE
-
Constructor Summary
Constructors Constructor Description SerializableTypeHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getResult(CallableStatement cs, int columnIndex)
Object
getResult(ResultSet rs, int columnIndex)
Object
getResult(ResultSet rs, String columnName)
static int
getSerializableType()
void
setParameter(PreparedStatement ps, int i, Object parameter, org.apache.ibatis.type.JdbcType jdbcType)
static void
setSerializableType(int serializableType)
Object
valueOf(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:
getResult
in 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:
getResult
in 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:
setParameter
in interfaceorg.apache.ibatis.type.TypeHandler
- Throws:
SQLException
-
getResult
public Object getResult(CallableStatement cs, int columnIndex) throws SQLException
- Specified by:
getResult
in interfaceorg.apache.ibatis.type.TypeHandler
- Throws:
SQLException
-
-