I have experienced going through all this for days recently. Take a look here and here.
Is this uuid going to be your Primary Key?
For the data type, it depends what is the business need for the data type of uuid. I would recommend you read this at least once.
To summarize and as per what I understood so far, use data type as String for your uuid and go for uuid4. If you are planning for Spring JPA/Hibernate, go for Long type for Primary/Foreign keys. That way you can easily maintain your keys and can index them easily rather than messing around indexing String type uuids.
And if you are looking for a unique identifier (as I was in my case) like uuid, go for a separate field in your entity of String type and generate uuid4 data type and treat it as a String. String is suggested as you can always port them from one DB to another without any hassle. Always consider the fact of migrating your data between different DBs (MSSQL/Oracle/DB2/Postgres etc).
Now, coming back to using UUID, you can always do:
@NotEmpty
@Column(name = "useruuid")
@GenericGenerator(name = "uuid", strategy = "uuid4")
private String useruuid;
and to generate UUIDs you can simply use :
UUID.randomUUID()
or
UUID.randomUUID().toString();
Take a look at here and here for sample project which I recently posted.