fix: Update Dataset class to use java.sql.Date for date field to fix sorting after date
This commit is contained in:
parent
619bb0140a
commit
d6d3ca2121
@ -3,6 +3,7 @@ package de.uni_passau.fim.PADAS.group3.DataDash.model;
|
||||
import java.net.URL;
|
||||
import java.time.LocalDate;
|
||||
import java.util.UUID;
|
||||
import java.sql.Date;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.EnumType;
|
||||
@ -29,7 +30,7 @@ public class Dataset {
|
||||
|
||||
private String author;
|
||||
|
||||
private LocalDate date;
|
||||
private Date date;
|
||||
|
||||
private float raiting;
|
||||
|
||||
@ -73,7 +74,7 @@ public class Dataset {
|
||||
}
|
||||
|
||||
public LocalDate getDate() {
|
||||
return date;
|
||||
return date.toLocalDate();
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
@ -121,7 +122,7 @@ public class Dataset {
|
||||
}
|
||||
|
||||
public void setDate(LocalDate localDate) {
|
||||
this.date = localDate;
|
||||
this.date = Date.valueOf(localDate);
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
|
Loading…
Reference in New Issue
Block a user