Package org.genesys.blocks.model
Interface IdUUID
-
public interface IdUUIDModels that use UUID as permanent identifier. UUID column should not be updatable:@Column(unique = true, updatable = false, nullable = false) @@Type(type = "uuid-binary") protected UUID uuid;
The entity must generate a UUID before persisting the data:@PrePersist private void prepersist() { if (this.uuid == null) { this.uuid = UUID.randomUUID(); } }
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UUIDgetUuid()Gets the uuid.
-
-
-
Method Detail
-
getUuid
UUID getUuid()
Gets the uuid.- Returns:
- the uuid
-
-