55 lines
1.3 KiB
Java
55 lines
1.3 KiB
Java
|
package com.bib.essensbestellungsverwaltung;
|
||
|
|
||
|
import java.util.List;
|
||
|
|
||
|
public class Food {
|
||
|
private long id;
|
||
|
private String name;
|
||
|
private String description;
|
||
|
private boolean isDessert;
|
||
|
private FoodType foodType;
|
||
|
private List<Allergy> allergies;
|
||
|
|
||
|
public Food(long id, String name, String description, boolean isDessert, FoodType foodType, List<Allergy> allergies) {
|
||
|
this.id = id;
|
||
|
this.name = name;
|
||
|
this.description = description;
|
||
|
this.isDessert = isDessert;
|
||
|
this.foodType = foodType;
|
||
|
this.allergies = allergies;
|
||
|
}
|
||
|
|
||
|
public Food(String name, String description, boolean isDessert, FoodType foodType, List<Allergy> allergies) {
|
||
|
this.id = -1;
|
||
|
this.name = name;
|
||
|
this.description = description;
|
||
|
this.isDessert = isDessert;
|
||
|
this.foodType = foodType;
|
||
|
this.allergies = allergies;
|
||
|
}
|
||
|
|
||
|
public long getId() {
|
||
|
return id;
|
||
|
}
|
||
|
|
||
|
public String getName() {
|
||
|
return name;
|
||
|
}
|
||
|
|
||
|
public String getDescription() {
|
||
|
return description;
|
||
|
}
|
||
|
|
||
|
public boolean isDessert() {
|
||
|
return isDessert;
|
||
|
}
|
||
|
|
||
|
public FoodType getFoodType() {
|
||
|
return foodType;
|
||
|
}
|
||
|
|
||
|
public List<Allergy> getAllergies() {
|
||
|
return allergies;
|
||
|
}
|
||
|
}
|