Package com.ibatis.sqlmap.engine.type
Class BlobTypeHandlerCallback
java.lang.Object
com.ibatis.sqlmap.engine.type.BlobTypeHandlerCallback
- All Implemented Interfaces:
TypeHandlerCallback
The Class BlobTypeHandlerCallback.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetResult(ResultGetter getter) Performs processing on a value before after it has been retrieved from a ResultSet.voidsetParameter(ParameterSetter setter, Object parameter) Performs processing on a value before it is used to set the parameter of a PreparedStatement.Casts the string representation of a value into a type recognized by this type handler.
-
Constructor Details
-
BlobTypeHandlerCallback
public BlobTypeHandlerCallback()
-
-
Method Details
-
getResult
Description copied from interface:TypeHandlerCallbackPerforms processing on a value before after it has been retrieved from a ResultSet.- Specified by:
getResultin interfaceTypeHandlerCallback- Parameters:
getter- The interface for getting the value from the ResultSet.- Returns:
- The processed value.
- Throws:
SQLException- If any error occurs.
-
setParameter
Description copied from interface:TypeHandlerCallbackPerforms processing on a value before it is used to set the parameter of a PreparedStatement.- Specified by:
setParameterin interfaceTypeHandlerCallback- Parameters:
setter- The interface for setting the value on the PreparedStatement.parameter- The value to be set.- Throws:
SQLException- If any error occurs.
-
valueOf
Description copied from interface:TypeHandlerCallbackCasts 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:
valueOfin interfaceTypeHandlerCallback- Parameters:
s- A string representation of a valid value for this type.- Returns:
- One of the following:
- the casted repersentation of the String value,
- the string as is,
- null, only if null was passed in.
-