Properties props = new Properties();
props.setProperty("separator", "/");
IdentifierGenerator gen = new UUIDHexGenerator();
( (Configurable) gen ).configure(Hibernate.STRING, props, null);
IdentifierGenerator gen2 = new UUIDHexGenerator();
( (Configurable) gen2 ).configure(Hibernate.STRING, props, null);
for ( int i=0; i<10; i++) {
String id = (String) gen.generate(null, null);
System.out.println(id);
String id2 = (String) gen2.generate(null, null);
System.out.println(id2);
}
_________________ --------------
Konstantin
SourceLabs - dependable OpenSource systems
|