Class BooleanTypeHandler

java.lang.Object
com.ibatis.sqlmap.engine.type.BaseTypeHandler
com.ibatis.sqlmap.engine.type.BooleanTypeHandler
All Implemented Interfaces:
TypeHandler

public class BooleanTypeHandler extends BaseTypeHandler implements TypeHandler
Boolean implementation of TypeHandler.
  • Constructor Details

    • BooleanTypeHandler

      public BooleanTypeHandler()
  • Method Details

    • setParameter

      public void setParameter(PreparedStatement ps, int i, Object parameter, String jdbcType) throws 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:
      SQLException - if setting the parameter fails
    • getResult

      public Object getResult(ResultSet rs, String columnName) throws 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:
      SQLException - if getting the value fails
    • getResult

      public Object getResult(ResultSet rs, int columnIndex) throws 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:
      SQLException - if getting the value fails
    • getResult

      public Object getResult(CallableStatement cs, int columnIndex) throws 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:
      SQLException - if getting the value fails
    • valueOf

      public Object valueOf(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