fix: Update Dataset class to use java.sql.Date for date field to fix sorting after date
This commit is contained in:
		@@ -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) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user