Example usage for org.apache.ibatis.executor.result ResultMapException ResultMapException

List of usage examples for org.apache.ibatis.executor.result ResultMapException ResultMapException

Introduction

In this page you can find the example usage for org.apache.ibatis.executor.result ResultMapException ResultMapException.

Prototype

public ResultMapException(String message, Throwable cause) 

Source Link

Usage

From source file:com.github.jneat.mybatis.NotNullResultTypeHandler.java

License:Open Source License

@Override
public T getResult(ResultSet rs, String columnName) throws SQLException {
    try {//w ww  .j  a  v  a 2 s  .  c om
        return getNullableResult(rs, columnName);
    } catch (Exception e) {
        throw new ResultMapException(
                "Error attempting to get column '" + columnName + "' from result set.  Cause: " + e, e);
    }
}

From source file:com.github.jneat.mybatis.NotNullResultTypeHandler.java

License:Open Source License

@Override
public T getResult(ResultSet rs, int columnIndex) throws SQLException {
    try {//w  w w .j a  v  a 2 s .  com
        return getNullableResult(rs, columnIndex);
    } catch (Exception e) {
        throw new ResultMapException(
                "Error attempting to get column #" + columnIndex + " from result set.  Cause: " + e, e);
    }
}

From source file:com.github.jneat.mybatis.NotNullResultTypeHandler.java

License:Open Source License

@Override
public T getResult(CallableStatement cs, int columnIndex) throws SQLException {
    try {/*from  ww w . j av  a2 s .c  om*/
        return getNullableResult(cs, columnIndex);
    } catch (Exception e) {
        throw new ResultMapException(
                "Error attempting to get column #" + columnIndex + " from callable statement.  Cause: " + e, e);
    }
}