Here you can find the source of getIntFromResultSet(ResultSet rs, String field)
public static Integer getIntFromResultSet(ResultSet rs, String field)
//package com.java2s; //License from project: Apache License import java.sql.ResultSet; public class Main { public static Integer getIntFromResultSet(ResultSet rs, String field) { Integer result = null;//w ww . j a va 2s.c o m try { Object value = rs.getObject(field); if (value != null) { result = (Integer) value; } } catch (Exception e) { } return result; } }