java.lang.Object
com.tccc.kos.ext.dispense.service.ingredient.BaseIngredient
com.tccc.kos.ext.freestyle.service.brandset.beans.Ingredient
All Implemented Interfaces:
Cloneable

public class Ingredient extends com.tccc.kos.ext.dispense.service.ingredient.BaseIngredient implements Cloneable
This defines the characteristics of a single ingredient. This bean matches the Ingredients table in the master recipe database.
Since:
1.0
Version:
Apr-6-17
  • Field Details

  • Constructor Details

    • Ingredient

      public Ingredient()
  • Method Details

    • getDisplayName

      public String getDisplayName()
    • isWater

      public static boolean isWater(String ingredientId)
      Return true if the specified ingredientId is a type of water.
      Parameters:
      ingredientId - the ingredientId to check
    • isSweetener

      public static boolean isSweetener(String ingredientId)
      Return true if the specified ingredientId is a type of sweetener.
      Parameters:
      ingredientId - the ingredientId to check
    • isSanitizer

      public static boolean isSanitizer(String ingredientId)
      Return true if the specified ingredientId is sanitizer.
      Parameters:
      ingredientId - the ingredientId to check
    • isHFCS

      public static boolean isHFCS(String ingredientId)
      return true if the specified ingredientId is HFCS
      Parameters:
      ingredientId - the ingredientId to check
    • isFIS

      public static boolean isFIS(String ingredientId)
      return true if the specified ingredientId is FIS
      Parameters:
      ingredientId - the ingredientId to check
    • isNS

      public static boolean isNS(String ingredientId)
      return true if the specified ingredientId is NS
      Parameters:
      ingredientId - the ingredientId to check
    • isNNS

      public static boolean isNNS(String ingredientId)
      return true if the specified ingredientId is NNS
      Parameters:
      ingredientId - the ingredientId to check
    • isMicro

      public boolean isMicro()
      Return true if the ingredient is a micro ingredient.
    • getChangeOutRule

      public int getChangeOutRule(String toIngredientId, int defaultRule)
      Return the change out rule for switching to the specified ingredientId. Returns the rule, or the default if no rule was found.
      Parameters:
      toIngredientId - the ingredient to switch to
      defaultRule - the default to return if no rule is found
      Returns:
      the matching rule (ChangeOutRule.VAL)
    • getExpirationDateFromEnjoyByDate

      public Date getExpirationDateFromEnjoyByDate(Date enjoyByDate)
      Given an enjoy by date, add the ingredient defined offset to return the actual expiration date.
      Parameters:
      enjoyByDate - the enjoy by date for the ingredient
      Returns:
      the expiration date
    • getEnjoyByDateFromExpirationDate

      public Date getEnjoyByDateFromExpirationDate(Date expDate)
      Given an expiration date, subtract the ingredient defined offset to return the enjoy by date.
      Parameters:
      expDate - the expiration date for the ingredient
      Returns:
      the enjoy by date
    • clone

      public Object clone() throws CloneNotSupportedException
      Throws:
      CloneNotSupportedException