This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
I guess you are using class java.util.UUID. The documentation of that class says:
A class that represents an immutable universally unique identifier (UUID). A UUID represents a 128-bit value.
It will not fit in a long (which is 64 bits) and certainly not in an integer (which is 32 bits). It can fit in two longs, and class UUID has two methods: getLeastSignificantBits() and getMostSignificantBits() with which you can get the lower and upper 64 bits of the UUID.