@Target(value={TYPE,METHOD,FIELD}) @Retention(value=RUNTIME) @Repeatable(value=UuidGenerators.class) public @interface UuidGenerator
GeneratedValue annotation. A UUID generator
may be specified on the entity class or on the primary key
field or property. The scope of the generator name is global
to the persistence unit (across all generator types).
Example 1:
@Entity public class Employee {
...
@UuidGenerator(name="uuid")
@Id
@GeneratedValue(generator="uuid")
int id;
...
}
GeneratedValuepublic abstract String name
Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.