In the Hibernate Layer,database column price is mapped with Double type. However due to the business logic, I have to handle empty field for the price. Not having a price and having 0.0 for price have two different meaning in the buiness logic. How to handle this?
boolean day1 = true;
boolean day2 = true;
boolean day3 = true;
boolean day4 = true;
boolean day5 = true;
boolean day6 = true;
boolean day7 = true;
//double ogPrice = 10.99;
OrderGuideProduct orderGuideProduct = new OrderGuideProduct();
orderGuideProduct.setDay1(day1);
orderGuideProduct.setDay2(day2);
orderGuideProduct.setDay3(day3);
orderGuideProduct.setDay4(day4);
orderGuideProduct.setDay5(day5);
orderGuideProduct.setDay6(day6);
orderGuideProduct.setDay7(day7);
// this is where I need to set the empty value
orderGuideProduct.setOgPrice();