Reverse the order of type 1 uuid

61 views
Skip to first unread message

Mark Arnold

unread,
Apr 15, 2014, 2:37:05 PM4/15/14
to java-uuid-ge...@googlegroups.com
I'm generating a UUID as follows:

EthernetAddress nic = EthernetAddress.fromInterface();

TimeBasedGenerator uuidGenerator = Generators.timeBasedGenerator(nic);

return uuidGenerator.generate();


This works well however I notice the sequential portion of the UUID appears at the end.  In my case I must convert the UUID to a string before storing in SQL Server, and SQL Server orders strings based on the characters at the beginning, not the end.  Is there a way to put the sequential portion of the UUID at the beginning?  Or is this best handled by converting a string, then reversing the order with string operations?


Thanks

Mark

Reply all
Reply to author
Forward
0 new messages