How to get a random number from a database in java?