Here you can find the source of nextLongId()
public static Long nextLongId()
//package com.java2s; //License from project: Open Source License import java.util.Random; public class Main { public static final Random RANDOM = new Random(); public static Long nextLongId() { return RANDOM.nextLong() + 1; }/*from w w w. j av a 2 s . c o m*/ public static Long nextLong() { return RANDOM.nextLong(); } }