/*
  * This method initializes the awardDocument ,award and awardAamountInfo
  * reference variables
  */
 private void initialize(Award award) {
   this.awardDocument = award.getAwardDocument();
   this.award = award;
   List<AwardAmountInfo> awardAmountInfos = award.getAwardAmountInfos();
   if (awardAmountInfos != null && !awardAmountInfos.isEmpty()) {
     awardAmountInfo = awardAmountInfos.get(0);
   }
 }
 /*
  * This method will set the values to AwardPaymentSchedules attributes and
  * finally returns AwardPaymentSchedules Xml object
  */
 private AwardPaymentSchedules getAwardPaymentSchedules() {
   AwardPaymentSchedules awardPaymentSchedules = AwardPaymentSchedules.Factory.newInstance();
   PaymentSchedule paymentSchedule = null;
   List<PaymentSchedule> paymentSchedulesList = new LinkedList<PaymentSchedule>();
   for (AwardPaymentSchedule awardPaymentSchedule : award.getPaymentScheduleItems()) {
     paymentSchedule = getAwardPaymentSchedule(awardPaymentSchedule);
     paymentSchedulesList.add(paymentSchedule);
   }
   awardPaymentSchedules.setPaymentScheduleArray(
       paymentSchedulesList.toArray(new PaymentSchedule[0]));
   return awardPaymentSchedules;
 }
 /*
  * This method will set the values to AwardSpecialReviews attributes and
  * finally returns AwardSpecialReviews Xml object
  */
 private AwardSpecialReviews getAwardSpecialReviews() {
   AwardSpecialReviews awardSpecialReviews = AwardSpecialReviews.Factory.newInstance();
   List<SpecialReviewType> specialReviewTypesList = new LinkedList<SpecialReviewType>();
   List<AwardSpecialReview> specialReviewList = award.getSpecialReviews();
   SpecialReviewType specialReviewType = null;
   for (AwardSpecialReview awardSpecialReview : specialReviewList) {
     specialReviewType = getAwardSpecialReview(awardSpecialReview);
     specialReviewTypesList.add(specialReviewType);
   }
   awardSpecialReviews.setSpecialReviewArray(
       specialReviewTypesList.toArray(new SpecialReviewType[0]));
   return awardSpecialReviews;
 }
 /*
  * This method will set the values to AwardTransferringSponsors attributes
  * and finally returns AwardTransferringSponsors Xml object
  */
 private AwardTransferringSponsors getAwardTransferringSponsors() {
   AwardTransferringSponsors transferringSponsors =
       AwardTransferringSponsors.Factory.newInstance();
   List<TransferringSponsor> transferringSponsorList = new LinkedList<TransferringSponsor>();
   List<AwardTransferringSponsor> awardTransferringSponsorList =
       award.getAwardTransferringSponsors();
   TransferringSponsor transferringSponsor = null;
   for (AwardTransferringSponsor awardTransferringSponsor : awardTransferringSponsorList) {
     transferringSponsor = getAwardTransferringSponsor(awardTransferringSponsor);
     transferringSponsorList.add(transferringSponsor);
   }
   transferringSponsors.setTransferringSponsorArray(
       transferringSponsorList.toArray(new TransferringSponsor[0]));
   return transferringSponsors;
 }
 /*
  * This method will set the values to AwardBudgetDetails attributes and
  * finally returns AwardBudgetDetails Xml object
  */
 private AwardBudgetDetails getAwardBudgetDetails() {
   AwardBudgetDetails awardBudgetDetails = AwardBudgetDetails.Factory.newInstance();
   List<BudgetDetails> budgetDetailsList = new ArrayList<BudgetDetails>();
   BudgetDocument budgetDocument = getBudgetDocument();
   if (budgetDocument != null) {
     for (BudgetLineItem budgetLineItem :
         budgetDocument.getBudget().getBudgetPeriod(0).getBudgetLineItems()) {
       BudgetDetails budgetDetails = BudgetDetails.Factory.newInstance();
       budgetDetails.setAwardNumber(award.getAwardNumber());
       budgetDetails.setSequenceNumber(award.getSequenceNumber());
       budgetDetails.setLineItemNumber(budgetLineItem.getLineItemNumber());
       budgetDetails.setCostElementCode(budgetLineItem.getCostElement());
       budgetDetails.setCostElementDescription(budgetLineItem.getCostElementBO().getDescription());
       budgetDetails.setLineItemDescription(budgetLineItem.getLineItemDescription());
       budgetDetailsList.add(budgetDetails);
     }
   }
   awardBudgetDetails.setBudgetDetailsArray(budgetDetailsList.toArray(new BudgetDetails[0]));
   return awardBudgetDetails;
 }