Here you can find the source of toLongId(Integer i)
public static Long toLongId(Integer i)
//package com.java2s; //it under the terms of the GNU Affero General Public License as published by public class Main { public static Long toLongId(Integer i) { if (i == null) return null; return Long.valueOf(i.longValue()); }/*from w w w. j a v a 2 s . c o m*/ public static Long toLongId(Number i) { if (i == null) return null; return Long.valueOf(i.longValue()); } public static Long toLongId(int i) { return Long.valueOf(i); } public static Long toLongId(Object o) { if (o == null) return null; if (o instanceof Integer) return toLongId((Integer) o); else if (o instanceof Long) return (Long) o; else throw new IllegalArgumentException("toLongId(" + o + ")"); } }