How can I convert a long to int in Java?
If direct casting shows error you can do it like this:
Long id = 100; int int_id = (int) (id % 100000);