BaseEntity.java 545 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 02 Feb 2025, Andrew Grant of Carrick Software .
  3. * All rights reserved.
  4. */
  5. package scot.carricksoftware.grants;
  6. import jakarta.persistence.GeneratedValue;
  7. import jakarta.persistence.GenerationType;
  8. import jakarta.persistence.Id;
  9. import jakarta.persistence.MappedSuperclass;
  10. @MappedSuperclass
  11. public class BaseEntity {
  12. @Id
  13. @GeneratedValue(strategy = GenerationType.IDENTITY)
  14. private Long id;
  15. public void setId(Long id) {
  16. this.id = id;
  17. }
  18. public Long getId() {
  19. return id;
  20. }
  21. }