BaseEntity.java 615 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (c) 02 Feb 2025, Andrew Grant of Carrick Software .
  3. * All rights reserved.
  4. */
  5. package scot.carricksoftware.grantswriter;
  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. @SuppressWarnings("unused")
  16. public void setId(Long id) {
  17. this.id = id;
  18. }
  19. @SuppressWarnings("unused")
  20. public Long getId() {
  21. return id;
  22. }
  23. }