Here you can find the source of getLongOrNull(ResultSet rs, String column)
public static Long getLongOrNull(ResultSet rs, String column) throws SQLException
//package com.java2s; //License from project: Apache License import java.sql.ResultSet; import java.sql.SQLException; public class Main { public static Long getLongOrNull(ResultSet rs, String column) throws SQLException { long lVal = rs.getLong(column); if (rs.wasNull()) { return null; }//from w ww . ja va 2 s . c o m return new Long(lVal); } }