@@ -0,0 +1,1505 @@
+package pl.mycalories.model;%0D%0A%0D%0Aimport javax.persistence.*;%0D%0Aimport javax.validation.constraints.NotNull;%0D%0A%0D%0A@Entity%0D%0A@SequenceGenerator(name = %22idgen%22, sequenceName = %22product_id_seq%22, allocationSize = 1)%0D%0Apublic class Product extends AbstractModel %7B%0D%0A%0D%0A    @NotNull%0D%0A    private String name;%0D%0A%0D%0A    @ManyToOne%0D%0A    @JoinColumn(name = %22category_id%22)%0D%0A    private Category category;%0D%0A%0D%0A    @Embedded%0D%0A    private NutritionalValues nutritionalValues;%0D%0A%0D%0A    public String getName() %7B%0D%0A        return name;%0D%0A    %7D%0D%0A%0D%0A    public void setName(String name) %7B%0D%0A        this.name = name;%0D%0A    %7D%0D%0A%0D%0A    public Category getCategory() %7B%0D%0A        return category;%0D%0A    %7D%0D%0A%0D%0A    public void setCategory(Category category) %7B%0D%0A        this.category = category;%0D%0A    %7D%0D%0A%0D%0A    public NutritionalValues getNutritionalValues() %7B%0D%0A        return nutritionalValues;%0D%0A    %7D%0D%0A%0D%0A    public void setNutritionalValues(NutritionalValues nutritionalValues) %7B%0D%0A        this.nutritionalValues = nutritionalValues;%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    public boolean equals(Object o) %7B%0D%0A        if (this == o) return true;%0D%0A        if (!(o instanceof Product)) return false;%0D%0A        if (!super.equals(o)) return false;%0D%0A%0D%0A        Product product = (Product) o;%0D%0A%0D%0A        return name != null ? name.equals(product.name) : product.name == null;%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    public int hashCode() %7B%0D%0A        int result = super.hashCode();%0D%0A        result = 31 * result + (name != null ? name.hashCode() : 0);%0D%0A        return result;%0D%0A    %7D%0D%0A%7D%0D%0A

add product model