From 0d7f39b00e0d87f3f66893681bc889f3783adc4a Mon Sep 17 00:00:00 2001 From: Codinab Date: Wed, 21 Feb 2024 17:31:20 +0100 Subject: [PATCH] Fixed to extend UriEntity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Mario Fernandez -Àlex Codina --- .../eps/softarch/demo/domain/MedicalRecord.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/main/java/cat/udl/eps/softarch/demo/domain/MedicalRecord.java b/src/main/java/cat/udl/eps/softarch/demo/domain/MedicalRecord.java index b045124e..b56caadf 100644 --- a/src/main/java/cat/udl/eps/softarch/demo/domain/MedicalRecord.java +++ b/src/main/java/cat/udl/eps/softarch/demo/domain/MedicalRecord.java @@ -2,14 +2,16 @@ import java.util.Date; -public class MedicalRecord { - private Integer id; +public class MedicalRecord extends UriEntity { + private final Long id; private String issue; private String description; private Date date; + + // Constructor - public MedicalRecord(Integer id, String issue, String description, Date date) { + public MedicalRecord(Long id, String issue, String description, Date date) { this.id = id; this.issue = issue; this.description = description; @@ -17,14 +19,10 @@ public MedicalRecord(Integer id, String issue, String description, Date date) { } // Getters and Setters - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { - this.id = id; - } - public String getIssue() { return issue; }