Here you can find the source of getBigDecimal(ResultSet rs, String columnLabel)
public static BigDecimal getBigDecimal(ResultSet rs, String columnLabel) throws SQLException
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; import java.math.RoundingMode; import java.sql.ResultSet; import java.sql.SQLException; public class Main { public static BigDecimal getBigDecimal(ResultSet rs, String columnLabel) throws SQLException { BigDecimal bigDecimal = rs.getBigDecimal(columnLabel); if (bigDecimal != null) { return bigDecimal; } else {//from w ww.j a v a2s . c o m return null; } } public static BigDecimal getBigDecimal(ResultSet rs, String columnLabel, int scale, RoundingMode roundingMode) throws SQLException, ArithmeticException { BigDecimal bigDecimal = rs.getBigDecimal(columnLabel); if (bigDecimal != null) { return bigDecimal.setScale(scale, roundingMode); } else { return null; } } }