use of BasicCommonClasses.Ingredient in project SmartCity-Market by TechnionYP5777.
the class CustomerRegistration_IngredientsScreen method updateIngredientsCheckList.
private void updateIngredientsCheckList() {
ICustomer customer = InjectionFactory.getInstance(Customer.class);
try {
ingredientsObservableList.addAll(customer.getAllIngredients());
} catch (SMException e) {
log.fatal(e);
log.debug(StackTraceUtil.getStackTrace(e));
e.showInfoToUser();
}
ingredientsCheckListView.setItems(ingredientsObservableList);
HashSet<Ingredient> currentAllergans = TempCustomerProfilePassingData.customerProfile.getAllergens();
if (currentAllergans != null && !currentAllergans.isEmpty())
updateListViewWithChosenIngreidients(currentAllergans);
}
use of BasicCommonClasses.Ingredient in project SmartCity-Market by TechnionYP5777.
the class Serialization method deserializeIngredientHashSet.
public static HashSet<Ingredient> deserializeIngredientHashSet(String hashsetToDeserialize) {
Gson gson = new Gson();
Type hashsetType = new TypeToken<HashSet<Ingredient>>() {
}.getType();
HashSet<Ingredient> result = gson.fromJson(hashsetToDeserialize, hashsetType);
return result;
}
Aggregations