Class GeneratedValue.UUIDGenerator
java.lang.Object
org.springframework.data.neo4j.core.schema.GeneratedValue.UUIDGenerator
- All Implemented Interfaces:
IdGenerator<UUID>
- Enclosing class:
GeneratedValue
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateId(String primaryLabel, Object entity) Generates a new id for given entity.
-
Constructor Details
-
UUIDGenerator
public UUIDGenerator()
-
-
Method Details
-
generateId
Description copied from interface:IdGeneratorGenerates a new id for given entity.- Specified by:
generateIdin interfaceIdGenerator<UUID>- Parameters:
primaryLabel- the primary label under which the entity is registeredentity- the entity to be saved- Returns:
- id to be assigned to the entity
-