com.ibatis.sqlmap.engine.type
Class ClobTypeHandlerCallback

java.lang.Object
  extended bycom.ibatis.sqlmap.engine.type.ClobTypeHandlerCallback
All Implemented Interfaces:
TypeHandlerCallback

public class ClobTypeHandlerCallback
extends java.lang.Object
implements TypeHandlerCallback


Constructor Summary
ClobTypeHandlerCallback()
           
 
Method Summary
 java.lang.Object getResult(ResultGetter getter)
          Performs processing on a value before after it has been retrieved from a ResultSet.
 void setParameter(ParameterSetter setter, java.lang.Object parameter)
          Performs processing on a value before it is used to set the parameter of a PreparedStatement.
 java.lang.Object valueOf(java.lang.String s)
          Casts the string representation of a value into a type recognized by this type handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClobTypeHandlerCallback

public ClobTypeHandlerCallback()
Method Detail

getResult

public java.lang.Object getResult(ResultGetter getter)
                           throws java.sql.SQLException
Description copied from interface: TypeHandlerCallback
Performs processing on a value before after it has been retrieved from a ResultSet.

Specified by:
getResult in interface TypeHandlerCallback
Parameters:
getter - The interface for getting the value from the ResultSet.
Returns:
The processed value.
Throws:
java.sql.SQLException - If any error occurs.

setParameter

public void setParameter(ParameterSetter setter,
                         java.lang.Object parameter)
                  throws java.sql.SQLException
Description copied from interface: TypeHandlerCallback
Performs processing on a value before it is used to set the parameter of a PreparedStatement.

Specified by:
setParameter in interface TypeHandlerCallback
Parameters:
setter - The interface for setting the value on the PreparedStatement.
parameter - The value to be set.
Throws:
java.sql.SQLException - If any error occurs.

valueOf

public java.lang.Object valueOf(java.lang.String s)
Description copied from interface: TypeHandlerCallback
Casts the string representation of a value into a type recognized by this type handler. This method is used to translate nullValue values into types that can be appropriately compared. If your custom type handler cannot support nullValues, or if there is no reasonable string representation for this type (e.g. File type), you can simply return the String representation as it was passed in. It is not recommended to return null, unless null was passed in.

Specified by:
valueOf in interface TypeHandlerCallback
Parameters:
s - A string representation of a valid value for this type.
Returns:
One of the following:
  1. the casted repersentation of the String value,
  2. the string as is,
  3. null, only if null was passed in.