Top Description Methods
org.eclipse.persistence.annotations

public @Interface UuidGenerator

extends Annotation
Annotations
@Target:TYPE, METHOD, FIELD
@Retention:RUNTIME
@Repeatable:UuidGenerators
Imports
java.lang.annotation.Retention, .Target, .Repeatable, jakarta.persistence.GeneratedValue

Defines a primary key generator that may be referenced by name when a generator element is specified for the 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;
       ...
   }
Author
James Sutherland
Since
EclipseLink 2.4
See Also
jakarta.persistence.GeneratedValue

Method Summary

Modifier and TypeMethod and Description
public String
name()

The name of the UUID generator, names must be unique for the persistence unit.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

nameback to summary
public String name()

The name of the UUID generator, names must be unique for the persistence unit.