my java JPA Entity use the following code to generate its UUID
@Entity
public class Myclass {
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid")
String id;
String name;
}
In Oracle and in java as a string, the ID end up being something like this:
2c96cc2a52f9f9a90152fa6549f40008
a 32 hexadecimal character string.
I have to interact with some third party system that needs to save my ID in various places and it has to be the same. Unfortunately, their fields only allow 30-character string (any char, not only hexadecimal).
So I need my uuid to look like a 30-character or less string wherever it appears (in oracle, in java, in that third party system, etc).
What should i do so that the representation of that uuid uses all the alphanumerical characters ('ghi...z' but no weird characters) to be shorter and how to make sure this representation is what is visible in the DB and in the app?
Many Thanks