Class BaseIngredient
java.lang.Object
com.tccc.kos.ext.dispense.service.ingredient.BaseIngredient
Basic abstraction of an ingredient. Ingredients are exposed
to
IngredientService
using IngredientSource
.
When an IngredientSource
is added to
IngredientService
all the ingredients in the source
will be tagged with the source object. This means that
ingredient instances can only be in a single source, and must
be in the source at the time the source is added to the service.
This class is typically extended to include additional properties required by a given application.
- Since:
- 1.0
- Version:
- 2023-01-05
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()
Return the id of the ingredient.getName()
Return theIngredientSource
the ingredient is part of.Return theIngredientSource
id of the ingredient.getType()
Return the optional compatibility type of the ingredient.void
Set the id of the ingredient.void
void
Set the optional compatibility type of the ingredient.
-
Constructor Details
-
BaseIngredient
public BaseIngredient()Default constructor
-
-
Method Details
-
getSourceId
Return theIngredientSource
id of the ingredient. -
getSource
Return theIngredientSource
the ingredient is part of. -
getId
Return the id of the ingredient. -
setId
Set the id of the ingredient. -
getType
Return the optional compatibility type of the ingredient. This can be matched withHolder.getIngType()
to help describe which ingredients are compatible with which holders. If this data is set in both holders and ingredients, the sdk and other internal services will make it easy to match ingredients to holders and perform additional validation during insertion.This is generally used to describe ingredient types like water / carb / syrup / flavor / micro / macro / etc...
-
setType
Set the optional compatibility type of the ingredient. This can be matched withHolder.getIngType()
to determine which ingredients are compatible with which holders. When used, additional validation will be performed and various sdk's will assist using this data.This is generally used to describe ingredient types like water / carb / syrup / flavor / micro / macro / etc...
-
getName
-
setName
-