Here you can find the source of getShortOrNull(ResultSet rs, String column)
public static Short getShortOrNull(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 Short getShortOrNull(ResultSet rs, String column) throws SQLException { short sVal = rs.getShort(column); if (rs.wasNull()) { return null; }//from w w w .j a v a 2s . c o m return new Short(sVal); } }