java.lang.Object
ntnu.idatt2016.v233.SmartMat.entity.product.Product

@Entity(name="product") public class Product extends Object
Product is an entity class representing a product in the system. All other info about the product is fetched from api call on fronted. this ensures that the product is always up to date.
Version:
1.4
Author:
Birk, Anders, Pedro
  • Constructor Details

    • Product

      public Product()
  • Method Details

    • addFridge

      public void addFridge(FridgeProductAsso fridge)
      Adds a fridge to the product
      Parameters:
      fridge - the fridge product association to add to the product
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • addShoppingList

      public void addShoppingList(ShoppingList shoppingList)
      Adds a shopping list to the product
      Parameters:
      shoppingList - the shopping list to add to the product
    • addAllergy

      public void addAllergy(Allergy allergy)
      Adds an allergy to the product
      Parameters:
      allergy - the allergy to add to the product
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object