Class Ingredient
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
int
getChangeOutRule
(String toIngredientId, int defaultRule) Return the change out rule for switching to the specified ingredientId.getEnjoyByDateFromExpirationDate
(Date expDate) Given an expiration date, subtract the ingredient defined offset to return the enjoy by date.getExpirationDateFromEnjoyByDate
(Date enjoyByDate) Given an enjoy by date, add the ingredient defined offset to return the actual expiration date.static boolean
return true if the specified ingredientId is FISstatic boolean
return true if the specified ingredientId is HFCSboolean
isMicro()
Return true if the ingredient is a micro ingredient.static boolean
return true if the specified ingredientId is NNSstatic boolean
return true if the specified ingredientId is NSstatic boolean
isSanitizer
(String ingredientId) Return true if the specified ingredientId is sanitizer.static boolean
isSweetener
(String ingredientId) Return true if the specified ingredientId is a type of sweetener.static boolean
Return true if the specified ingredientId is a type of water.Methods inherited from class com.tccc.kos.ext.dispense.service.ingredient.BaseIngredient
getId, getName, getSource, getSourceId, getType, setId, setName, setType
-
Field Details
-
K5
- See Also:
-
SANITIZER_A
- See Also:
-
SANITIZER_B
- See Also:
-
WATER
- See Also:
-
CARB
- See Also:
-
AMBIENT_WATER
- See Also:
-
NNS_BIB
- See Also:
-
NNS
- See Also:
-
HFCS
- See Also:
-
FIS
- See Also:
-
ORANGE_V2
- See Also:
-
ORANGE_GBR2
- See Also:
-
TYPE_MICRODOSE
- See Also:
-
TYPE_BIB
- See Also:
-
-
Constructor Details
-
Ingredient
public Ingredient()
-
-
Method Details
-
getDisplayName
-
isWater
Return true if the specified ingredientId is a type of water.- Parameters:
ingredientId
- the ingredientId to check
-
isSweetener
Return true if the specified ingredientId is a type of sweetener.- Parameters:
ingredientId
- the ingredientId to check
-
isSanitizer
Return true if the specified ingredientId is sanitizer.- Parameters:
ingredientId
- the ingredientId to check
-
isHFCS
return true if the specified ingredientId is HFCS- Parameters:
ingredientId
- the ingredientId to check
-
isFIS
return true if the specified ingredientId is FIS- Parameters:
ingredientId
- the ingredientId to check
-
isNS
return true if the specified ingredientId is NS- Parameters:
ingredientId
- the ingredientId to check
-
isNNS
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
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 todefaultRule
- the default to return if no rule is found- Returns:
- the matching rule (ChangeOutRule.VAL)
-
getExpirationDateFromEnjoyByDate
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
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
- Throws:
CloneNotSupportedException
-