Merge branch '28-fix-change-the-date-beeing-stored-as-a-sting-in-the-tatabease-for-soring-purposes' into '11-add-api-for-getting-home-page-data'
Resolve "Fix: Change the date beeing stored as a sting in the tatabease for soring purposes" See merge request padas/24ss-5430-web-and-data-eng/gruppe-3/datadash!23
This commit is contained in:
commit
89957dfbe4
@ -3,6 +3,7 @@ package de.uni_passau.fim.PADAS.group3.DataDash.model;
|
|||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import java.sql.Date;
|
||||||
|
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.EnumType;
|
import jakarta.persistence.EnumType;
|
||||||
@ -29,7 +30,7 @@ public class Dataset {
|
|||||||
|
|
||||||
private String author;
|
private String author;
|
||||||
|
|
||||||
private LocalDate date;
|
private Date date;
|
||||||
|
|
||||||
private float raiting;
|
private float raiting;
|
||||||
|
|
||||||
@ -73,7 +74,7 @@ public class Dataset {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getDate() {
|
public LocalDate getDate() {
|
||||||
return date;
|
return date.toLocalDate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
@ -121,7 +122,7 @@ public class Dataset {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setDate(LocalDate localDate) {
|
public void setDate(LocalDate localDate) {
|
||||||
this.date = localDate;
|
this.date = Date.valueOf(localDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDescription(String description) {
|
public void setDescription(String description) {
|
||||||
|
Loading…
Reference in New Issue
Block a user