Class GeneratedValue.UUIDGenerator

java.lang.Object
org.springframework.data.neo4j.core.schema.GeneratedValue.UUIDGenerator
All Implemented Interfaces:
IdGenerator<UUID>
Enclosing class:
GeneratedValue

public static final class GeneratedValue.UUIDGenerator extends Object implements IdGenerator<UUID>
This generator is automatically applied when a field of type UUID is annotated with @Id and @GeneratedValue.
Since:
6.0
Author:
Michael J. Simons
  • Constructor Details

    • UUIDGenerator

      public UUIDGenerator()
  • Method Details

    • generateId

      public UUID generateId(String primaryLabel, Object entity)
      Description copied from interface: IdGenerator
      Generates a new id for given entity.
      Specified by:
      generateId in interface IdGenerator<UUID>
      Parameters:
      primaryLabel - the primary label under which the entity is registered
      entity - the entity to be saved
      Returns:
      id to be assigned to the entity