added Methods in TaskListModel
added Field Crop ID in Task added method removeTasksforCrop
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package ch.zhaw.gartenverwaltung.io;
|
||||
|
||||
import ch.zhaw.gartenverwaltung.types.Crop;
|
||||
import ch.zhaw.gartenverwaltung.types.Task;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
|
||||
@@ -51,6 +52,16 @@ public class JsonTaskDatabase implements TaskDatabase{
|
||||
return taskMap.values().stream().filter(task -> task.isInTimePeriode(start, end)).toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Task> getTaskForCrop(Crop crop) {
|
||||
return null; //TODO implement
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeTasksForCrop(Crop crop) {
|
||||
// TODO implement
|
||||
}
|
||||
|
||||
/**
|
||||
* If no data is currently loaded, data is loaded from {@link #dataSource}.
|
||||
* If the {@link Task} has an id than the task is added to the {@link #taskMap}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package ch.zhaw.gartenverwaltung.io;
|
||||
|
||||
import ch.zhaw.gartenverwaltung.types.Crop;
|
||||
import ch.zhaw.gartenverwaltung.types.HardinessZone;
|
||||
import ch.zhaw.gartenverwaltung.types.Plant;
|
||||
import ch.zhaw.gartenverwaltung.types.Task;
|
||||
@@ -24,6 +25,10 @@ public interface TaskDatabase {
|
||||
*/
|
||||
List<Task> getTaskList(LocalDate start, LocalDate end) throws IOException;
|
||||
|
||||
List<Task> getTaskForCrop(Crop crop); //TODO Javadoc
|
||||
|
||||
void removeTasksForCrop(Crop crop); // TODO Javadoc
|
||||
|
||||
/**
|
||||
* Saves the {@link Task} in the Cache.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user