Ejemplo n.º 1
0
 private void setAwardHierarchy(
     AwardHierarchy awardHierarchy, ChildAwardDetails childAwardDetails) {
   if (awardHierarchy != null) {
     ChildAwardType childAwardType = childAwardDetails.addNewChildAward();
     AwardHierarchyType hierarchyType = childAwardType.addNewAwardHierarchy();
     hierarchyType.setAwardNumber(awardHierarchy.getAwardNumber());
     hierarchyType.setParentAwardNumber(awardHierarchy.getParentAwardNumber());
     hierarchyType.setRootAwardNumber(awardHierarchy.getRootAwardNumber());
     setAwardAmountInfoDetails(awardHierarchy, childAwardType);
     List<AwardHierarchy> children = awardHierarchy.getChildren();
     for (AwardHierarchy awardHierarchy2 : children) {
       setAwardHierarchy(awardHierarchy2, childAwardDetails);
     }
   }
 }
Ejemplo n.º 2
0
 private void setAwardAmountInfoDetails(
     AwardHierarchy awardHierarchy, ChildAwardType childAwardType) {
   awardHierarchy.refreshReferenceObject("award");
   Award childAward = awardHierarchy.getAward();
   AwardAmountInfo awardAmountInfo = childAward.getLastAwardAmountInfo();
   if (awardHierarchy.getAward().getAccountNumber() != null) {
     childAwardType.setAccountNumber(awardHierarchy.getAward().getAccountNumber());
   }
   if (awardAmountInfo.getAnticipatedTotalAmount() != null) {
     childAwardType.setAnticipatedTotalAmt(
         awardAmountInfo.getAnticipatedTotalAmount().bigDecimalValue());
   }
   if (awardAmountInfo.getFinalExpirationDate() != null) {
     Calendar finalExpDate = dateTimeService.getCalendar(awardAmountInfo.getFinalExpirationDate());
     childAwardType.setFinalExpirationDate(finalExpDate);
   }
   if (awardAmountInfo.getCurrentFundEffectiveDate() != null) {
     Calendar currentFundEffectiveDate =
         dateTimeService.getCalendar(awardAmountInfo.getCurrentFundEffectiveDate());
     childAwardType.setCurrentFundEffectiveDate(currentFundEffectiveDate);
   }
   if (awardAmountInfo.getAmountObligatedToDate() != null) {
     childAwardType.setAmtObligatedToDate(
         awardAmountInfo.getAmountObligatedToDate().bigDecimalValue());
   }
   if (awardAmountInfo.getObligationExpirationDate() != null) {
     Calendar obligationExpirationDate =
         dateTimeService.getCalendar(awardAmountInfo.getObligationExpirationDate());
     childAwardType.setObligationExpirationDate(obligationExpirationDate);
   }
   childAwardType.setPIName(childAward.getPrincipalInvestigator().getFullName());
 }