org.alfresco.ibatis
Class SerializableTypeHandlerCallback

java.lang.Object
  extended by org.alfresco.ibatis.SerializableTypeHandlerCallback
All Implemented Interfaces:
com.ibatis.sqlmap.client.extensions.TypeHandlerCallback

public class SerializableTypeHandlerCallback
extends java.lang.Object
implements com.ibatis.sqlmap.client.extensions.TypeHandlerCallback

TypeHandler for java.io.Serializable to BLOB types.

Since:
3.2

Nested Class Summary
static class SerializableTypeHandlerCallback.DeserializationException
          Marker exception to allow deserialization issues to be dealt with by calling code.
static class SerializableTypeHandlerCallback.SerializationException
          Marker exception to allow serialization issues to be dealt with by calling code.
 
Field Summary
static int DEFAULT_SERIALIZABLE_TYPE
           
 
Constructor Summary
SerializableTypeHandlerCallback()
           
 
Method Summary
 java.lang.Object getResult(com.ibatis.sqlmap.client.extensions.ResultGetter getter)
           
static int getSerializableType()
           
 void setParameter(com.ibatis.sqlmap.client.extensions.ParameterSetter setter, java.lang.Object parameter)
           
static void setSerializableType(int serializableType)
           
 java.lang.Object valueOf(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SERIALIZABLE_TYPE

public static final int DEFAULT_SERIALIZABLE_TYPE
See Also:
Constant Field Values
Constructor Detail

SerializableTypeHandlerCallback

public SerializableTypeHandlerCallback()
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 java.lang.Object getResult(com.ibatis.sqlmap.client.extensions.ResultGetter getter)
                           throws java.sql.SQLException
Specified by:
getResult in interface com.ibatis.sqlmap.client.extensions.TypeHandlerCallback
Throws:
SerializableTypeHandlerCallback.DeserializationException - if the object could not be deserialized
java.sql.SQLException

setParameter

public void setParameter(com.ibatis.sqlmap.client.extensions.ParameterSetter setter,
                         java.lang.Object parameter)
                  throws java.sql.SQLException
Specified by:
setParameter in interface com.ibatis.sqlmap.client.extensions.TypeHandlerCallback
Throws:
java.sql.SQLException

valueOf

public java.lang.Object valueOf(java.lang.String s)
Specified by:
valueOf in interface com.ibatis.sqlmap.client.extensions.TypeHandlerCallback
Returns:
Retruns the value given


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.