com.ibatis.sqlmap.engine.type
Class SqlTimestampTypeHandler

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

public class SqlTimestampTypeHandler
extends BaseTypeHandler
implements TypeHandler

SQL timestamp implementation of TypeHandler


Constructor Summary
SqlTimestampTypeHandler()
           
 
Method Summary
 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 com.ibatis.sqlmap.engine.type.BaseTypeHandler
equals
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibatis.sqlmap.engine.type.TypeHandler
equals
 

Constructor Detail

SqlTimestampTypeHandler

public SqlTimestampTypeHandler()
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