/*
  * This method will get the cost element description for line item.It checks
  * rate class type if it is OVERHEAD then concatenate OH with the rate Class
  * description otherwise concatenates rate class description with rate type
  * description
  */
 private String getCostElementDescriptionForLineItem(
     BudgetLineItemCalculatedAmount budgetLineItemCalcAmount, RateClass rateClass) {
   String costElementDesc = null;
   if (budgetLineItemCalcAmount.getRateTypeDescription() != null) {
     if (rateClass != null
         && rateClass.getRateClassTypeCode() != null
         && rateClass.getRateClassTypeCode().equals(RateClassType.OVERHEAD.getRateClassType())) {
       costElementDesc =
           new StringBuilder(OVERHEAD_RATE_PREFIX)
               .append(budgetLineItemCalcAmount.getRateTypeDescription())
               .toString();
     } else if (rateClass != null && rateClass.getDescription() != null) {
       costElementDesc =
           new StringBuilder(rateClass.getDescription())
               .append(SEPARATER_STRING)
               .append(budgetLineItemCalcAmount.getRateTypeDescription())
               .toString();
     }
   }
   return costElementDesc;
 }
Ejemplo n.º 2
0
 private RateClass getRateClass(String rateClassCode, String rateClassType) {
   RateClass rc = new RateClass();
   rc.setCode(rateClassCode);
   rc.setRateClassTypeCode(rateClassType);
   return rc;
 }