public void setPriceType(PriceType priceType) {
this.priceType = priceType;
}
public void convert(WorkTimeUnit targetWorkTimeUnit, BigDecimal numberOfHoursInDay) {
WorkTimeUnit existingTimeUnit = WorkTimeUnit.createInstance(invoicedQuantityType.getUnitCode(),
numberOfHoursInDay);
if (existingTimeUnit.equals(targetWorkTimeUnit)) {
return;
} else if (existingTimeUnit.equals(WorkTimeUnit.DAYS)) {
convertFromDaysToHours(numberOfHoursInDay);
} else if (existingTimeUnit.equals(WorkTimeUnit.HOURS)) {
convertFromHoursToDays(numberOfHoursInDay);
} else {
throw new IllegalArgumentException("WorkTimeUnit is not supported");
}
}