com.ibatis.sqlmap.engine.type
Class UnknownTypeHandler

java.lang.Object
  extended bycom.ibatis.sqlmap.engine.type.BaseTypeHandler
      extended bycom.ibatis.sqlmap.engine.type.UnknownTypeHandler
All Implemented Interfaces:
TypeHandler

public class UnknownTypeHandler
extends BaseTypeHandler
implements TypeHandler

Implementation of TypeHandler for dealing with unknown types


Constructor Summary
UnknownTypeHandler(TypeHandlerFactory factory)
          Constructor to create via a factory
 
Method Summary
 boolean equals(java.lang.Object object, java.lang.String string)
          Compares two values (that this handler deals with) for equality
 java.lang.Object getResult(java.sql.CallableStatement cs, int columnIndex)
          Gets a column from a callable statement
 java.lang.Object getResult(java.sql.ResultSet rs, int columnIndex)
          Gets a column from a result set
 java.lang.Object getResult(java.sql.ResultSet rs, java.lang.String columnName)
          Gets a column from a result set
 void setParameter(java.sql.PreparedStatement ps, int i, java.lang.Object parameter, java.lang.String jdbcType)
          Sets a parameter on a prepared statement
 java.lang.Object valueOf(java.lang.String s)
          Converts the String to the type that this handler deals with
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnknownTypeHandler

public UnknownTypeHandler(TypeHandlerFactory factory)
Constructor to create via a factory

Parameters:
factory - - the factory to associate this with
Method Detail

setParameter

public void setParameter(java.sql.PreparedStatement ps,
                         int i,
                         java.lang.Object parameter,
                         java.lang.String jdbcType)
                  throws java.sql.SQLException
Description copied from interface: TypeHandler
Sets a parameter on a prepared statement

Specified by:
setParameter in interface TypeHandler
Parameters:
ps - - the prepared statement
i - - the parameter index
parameter - - the parameter value
jdbcType - - the JDBC type of the parameter
Throws:
java.sql.SQLException - if setting the parameter fails

getResult

public java.lang.Object getResult(java.sql.ResultSet rs,
                                  java.lang.String columnName)
                           throws java.sql.SQLException
Description copied from interface: TypeHandler
Gets a column from a result set

Specified by:
getResult in interface TypeHandler
Parameters:
rs - - the result set
columnName - - the column name to get
Returns:
- the column value
Throws:
java.sql.SQLException - if getting the value fails

getResult

public java.lang.Object getResult(java.sql.ResultSet rs,
                                  int columnIndex)
                           throws java.sql.SQLException
Description copied from interface: TypeHandler
Gets a column from a result set

Specified by:
getResult in interface TypeHandler
Parameters:
rs - - the result set
columnIndex - - the column to get (by index)
Returns:
- the column value
Throws:
java.sql.SQLException - if getting the value fails

getResult

public java.lang.Object getResult(java.sql.CallableStatement cs,
                                  int columnIndex)
                           throws java.sql.SQLException
Description copied from interface: TypeHandler
Gets a column from a callable statement

Specified by:
getResult in interface TypeHandler
Parameters:
cs - - the statement
columnIndex - - the column to get (by index)
Returns:
- the column value
Throws:
java.sql.SQLException - if getting the value fails

valueOf

public java.lang.Object valueOf(java.lang.String s)
Description copied from interface: TypeHandler
Converts the String to the type that this handler deals with

Specified by:
valueOf in interface TypeHandler
Parameters:
s - - the String value
Returns:
- the converted value

equals

public boolean equals(java.lang.Object object,
                      java.lang.String string)
Description copied from interface: TypeHandler
Compares two values (that this handler deals with) for equality

Specified by:
equals in interface TypeHandler
Overrides:
equals in class BaseTypeHandler