[java] Converting Integer to Long

If you know that the Integer is not NULL, you can simply do this:

Integer intVal = 1;
Long longVal = (long) (int) intVal