private void setCumulativeTrainee(BudgetSummary budgetSummary,BudgetSummaryDto budgetSummaryData) {
        SummaryDataType summaryTraineeCosts = SummaryDataType.Factory.newInstance();
        if (budgetSummaryData != null) {
            if (budgetSummaryData.getpartOtherCost() != null && budgetSummaryData.getpartStipendCost() != null
                    && budgetSummaryData.getpartTravelCost() != null && budgetSummaryData.getPartSubsistence() != null
                    && budgetSummaryData.getPartTuition() != null) {
                summaryTraineeCosts.setFederalSummary(budgetSummaryData.getpartOtherCost().add(
                        budgetSummaryData.getpartStipendCost().add(
                                budgetSummaryData.getpartTravelCost().add(
                                        budgetSummaryData.getPartSubsistence().add(budgetSummaryData.getPartTuition()))))
                        .bigDecimalValue());
            }
            if (budgetSummaryData.getPartOtherCostSharing() != null && budgetSummaryData.getPartStipendCostSharing() != null
                    && budgetSummaryData.getPartTravelCostSharing() != null
                    && budgetSummaryData.getPartSubsistenceCostSharing() != null
                    && budgetSummaryData.getPartTuitionCostSharing() != null) {
                summaryTraineeCosts.setNonFederalSummary(budgetSummaryData.getPartOtherCostSharing().add(
                        budgetSummaryData.getPartStipendCostSharing().add(
                                budgetSummaryData.getPartTravelCostSharing().add(
                                        budgetSummaryData.getPartSubsistenceCostSharing().add(
                                                budgetSummaryData.getPartTuitionCostSharing())))).bigDecimalValue());
            }

            if (summaryTraineeCosts.getNonFederalSummary() != null) {
                if (summaryTraineeCosts.getFederalSummary() != null) {
                    summaryTraineeCosts.setTotalFedNonFedSummary(summaryTraineeCosts.getFederalSummary().add(
                            summaryTraineeCosts.getNonFederalSummary()));
                }

                else {
                    summaryTraineeCosts.setTotalFedNonFedSummary(summaryTraineeCosts.getNonFederalSummary());
                }
            }
            TotalDataType totalTuition = TotalDataType.Factory.newInstance();
            if (budgetSummaryData.getPartTuition() != null) {
                totalTuition.setFederal(budgetSummaryData.getPartTuition().bigDecimalValue());
            }
            if (budgetSummaryData.getPartTuitionCostSharing() != null) {
                totalTuition.setNonFederal(budgetSummaryData.getPartTuitionCostSharing().bigDecimalValue());
                if (budgetSummaryData.getPartTuition() != null) {
                    totalTuition.setTotalFedNonFed(budgetSummaryData.getPartTuition().add(
                            budgetSummaryData.getPartTuitionCostSharing()).bigDecimalValue());
                }
                else {
                    totalTuition.setTotalFedNonFed(budgetSummaryData.getPartTuitionCostSharing().bigDecimalValue());
                }
            }
            budgetSummary.setCumulativeTraineeTuitionFeesHealthInsurance(totalTuition);
            TotalDataType totalStipends = TotalDataType.Factory.newInstance();
            if (budgetSummaryData.getpartStipendCost() != null) {
                totalStipends.setFederal(budgetSummaryData.getpartStipendCost().bigDecimalValue());
            }
            if (budgetSummaryData.getPartStipendCostSharing() != null) {
                totalStipends.setNonFederal(budgetSummaryData.getPartStipendCostSharing().bigDecimalValue());
                if (budgetSummaryData.getpartStipendCost() != null) {
                    totalStipends.setTotalFedNonFed(budgetSummaryData.getpartStipendCost().add(
                            budgetSummaryData.getPartStipendCostSharing()).bigDecimalValue());
                }
                else {
                    totalStipends.setTotalFedNonFed(budgetSummaryData.getPartStipendCostSharing().bigDecimalValue());
                }
            }
            budgetSummary.setCumulativeTraineeStipends(totalStipends);
            TotalDataType totalTravel = TotalDataType.Factory.newInstance();
            if (budgetSummaryData.getpartTravelCost() != null) {
                totalTravel.setFederal(budgetSummaryData.getpartTravelCost().bigDecimalValue());
            }
            if (budgetSummaryData.getPartTravelCostSharing() != null) {
                totalTravel.setNonFederal(budgetSummaryData.getPartTravelCostSharing().bigDecimalValue());
                if (budgetSummaryData.getpartTravelCost() != null) {
                    totalTravel.setTotalFedNonFed(budgetSummaryData.getpartTravelCost().add(
                            budgetSummaryData.getPartTravelCostSharing()).bigDecimalValue());
                }
                else {
                    totalTravel.setTotalFedNonFed(budgetSummaryData.getPartTravelCostSharing().bigDecimalValue());
                }
            }
            budgetSummary.setCumulativeTraineeTravel(totalTravel);
            TotalDataType totalSubsistence = TotalDataType.Factory.newInstance();
            if (budgetSummaryData.getPartSubsistence() != null) {
                totalSubsistence.setFederal(budgetSummaryData.getPartSubsistence().bigDecimalValue());
            }
            if (budgetSummaryData.getPartSubsistenceCostSharing() != null) {
                totalSubsistence.setNonFederal(budgetSummaryData.getPartSubsistenceCostSharing().bigDecimalValue());
                if (budgetSummaryData.getPartSubsistence() != null) {
                    totalSubsistence.setTotalFedNonFed(budgetSummaryData.getPartSubsistence().add(
                            budgetSummaryData.getPartSubsistenceCostSharing()).bigDecimalValue());
                }
                else {
                    totalSubsistence.setTotalFedNonFed(budgetSummaryData.getPartSubsistenceCostSharing().bigDecimalValue());
                }
            }
            budgetSummary.setCumulativeTraineeSubsistence(totalSubsistence);
            TotalDataType totalOtherTrainee = TotalDataType.Factory.newInstance();
            if (budgetSummaryData.getpartOtherCost() != null) {
                totalOtherTrainee.setFederal(budgetSummaryData.getpartOtherCost().bigDecimalValue());
            }
            if (budgetSummaryData.getPartOtherCostSharing() != null) {
                totalOtherTrainee.setNonFederal(budgetSummaryData.getPartOtherCostSharing().bigDecimalValue());
                if (budgetSummaryData.getpartOtherCost() != null) {
                    totalOtherTrainee.setTotalFedNonFed(budgetSummaryData.getpartOtherCost().add(
                            budgetSummaryData.getPartOtherCostSharing()).bigDecimalValue());
                }
                else {
                    totalOtherTrainee.setTotalFedNonFed(budgetSummaryData.getPartOtherCostSharing().bigDecimalValue());
                }
            }
            budgetSummary.setCumulativeOtherTraineeCost(totalOtherTrainee);
            budgetSummary.setCumulativeNoofTrainees(budgetSummaryData.getparticipantCount());
        }
        budgetSummary.setCumulativeTotalFundsRequestedTraineeCosts(summaryTraineeCosts);
    }
private void setCumulativeTrainee ( BudgetSummary budgetSummary , BudgetSummaryDto budgetSummaryData ) { SummaryDataType summaryTraineeCosts = SummaryDataType . Factory . newInstance ( ) ; if ( budgetSummaryData != null ) { if ( budgetSummaryData . getpartOtherCost ( ) != null && budgetSummaryData . getpartStipendCost ( ) != null && budgetSummaryData . getpartTravelCost ( ) != null && budgetSummaryData . getPartSubsistence ( ) != null && budgetSummaryData . getPartTuition ( ) != null ) { summaryTraineeCosts . setFederalSummary ( budgetSummaryData . getpartOtherCost ( ) . add ( budgetSummaryData . getpartStipendCost ( ) . add ( budgetSummaryData . getpartTravelCost ( ) . add ( budgetSummaryData . getPartSubsistence ( ) . add ( budgetSummaryData . getPartTuition ( ) ) ) ) ) . bigDecimalValue ( ) ) ; } if ( budgetSummaryData . getPartOtherCostSharing ( ) != null && budgetSummaryData . getPartStipendCostSharing ( ) != null && budgetSummaryData . getPartTravelCostSharing ( ) != null && budgetSummaryData . getPartSubsistenceCostSharing ( ) != null && budgetSummaryData . getPartTuitionCostSharing ( ) != null ) { summaryTraineeCosts . setNonFederalSummary ( budgetSummaryData . getPartOtherCostSharing ( ) . add ( budgetSummaryData . getPartStipendCostSharing ( ) . add ( budgetSummaryData . getPartTravelCostSharing ( ) . add ( budgetSummaryData . getPartSubsistenceCostSharing ( ) . add ( budgetSummaryData . getPartTuitionCostSharing ( ) ) ) ) ) . bigDecimalValue ( ) ) ; } if ( summaryTraineeCosts . getNonFederalSummary ( ) != null ) { if ( summaryTraineeCosts . getFederalSummary ( ) != null ) { summaryTraineeCosts . setTotalFedNonFedSummary ( summaryTraineeCosts . getFederalSummary ( ) . add ( summaryTraineeCosts . getNonFederalSummary ( ) ) ) ; } else { summaryTraineeCosts . setTotalFedNonFedSummary ( summaryTraineeCosts . getNonFederalSummary ( ) ) ; } } TotalDataType totalTuition = TotalDataType . Factory . newInstance ( ) ; if ( budgetSummaryData . getPartTuition ( ) != null ) { totalTuition . setFederal ( budgetSummaryData . getPartTuition ( ) . bigDecimalValue ( ) ) ; } if ( budgetSummaryData . getPartTuitionCostSharing ( ) != null ) { totalTuition . setNonFederal ( budgetSummaryData . getPartTuitionCostSharing ( ) . bigDecimalValue ( ) ) ; if ( budgetSummaryData . getPartTuition ( ) != null ) { totalTuition . setTotalFedNonFed ( budgetSummaryData . getPartTuition ( ) . add ( budgetSummaryData . getPartTuitionCostSharing ( ) ) . bigDecimalValue ( ) ) ; } else { totalTuition . setTotalFedNonFed ( budgetSummaryData . getPartTuitionCostSharing ( ) . bigDecimalValue ( ) ) ; } } budgetSummary . setCumulativeTraineeTuitionFeesHealthInsurance ( totalTuition ) ; TotalDataType totalStipends = TotalDataType . Factory . newInstance ( ) ; if ( budgetSummaryData . getpartStipendCost ( ) != null ) { totalStipends . setFederal ( budgetSummaryData . getpartStipendCost ( ) . bigDecimalValue ( ) ) ; } if ( budgetSummaryData . getPartStipendCostSharing ( ) != null ) { totalStipends . setNonFederal ( budgetSummaryData . getPartStipendCostSharing ( ) . bigDecimalValue ( ) ) ; if ( budgetSummaryData . getpartStipendCost ( ) != null ) { totalStipends . setTotalFedNonFed ( budgetSummaryData . getpartStipendCost ( ) . add ( budgetSummaryData . getPartStipendCostSharing ( ) ) . bigDecimalValue ( ) ) ; } else { totalStipends . setTotalFedNonFed ( budgetSummaryData . getPartStipendCostSharing ( ) . bigDecimalValue ( ) ) ; } } budgetSummary . setCumulativeTraineeStipends ( totalStipends ) ; TotalDataType totalTravel = TotalDataType . Factory . newInstance ( ) ; if ( budgetSummaryData . getpartTravelCost ( ) != null ) { totalTravel . setFederal ( budgetSummaryData . getpartTravelCost ( ) . bigDecimalValue ( ) ) ; } if ( budgetSummaryData . getPartTravelCostSharing ( ) != null ) { totalTravel . setNonFederal ( budgetSummaryData . getPartTravelCostSharing ( ) . bigDecimalValue ( ) ) ; if ( budgetSummaryData . getpartTravelCost ( ) != null ) { totalTravel . setTotalFedNonFed ( budgetSummaryData . getpartTravelCost ( ) . add ( budgetSummaryData . getPartTravelCostSharing ( ) ) . bigDecimalValue ( ) ) ; } else { totalTravel . setTotalFedNonFed ( budgetSummaryData . getPartTravelCostSharing ( ) . bigDecimalValue ( ) ) ; } } budgetSummary . setCumulativeTraineeTravel ( totalTravel ) ; TotalDataType totalSubsistence = TotalDataType . Factory . newInstance ( ) ; if ( budgetSummaryData . getPartSubsistence ( ) != null ) { totalSubsistence . setFederal ( budgetSummaryData . getPartSubsistence ( ) . bigDecimalValue ( ) ) ; } if ( budgetSummaryData . getPartSubsistenceCostSharing ( ) != null ) { totalSubsistence . setNonFederal ( budgetSummaryData . getPartSubsistenceCostSharing ( ) . bigDecimalValue ( ) ) ; if ( budgetSummaryData . getPartSubsistence ( ) != null ) { totalSubsistence . setTotalFedNonFed ( budgetSummaryData . getPartSubsistence ( ) . add ( budgetSummaryData . getPartSubsistenceCostSharing ( ) ) . bigDecimalValue ( ) ) ; } else { totalSubsistence . setTotalFedNonFed ( budgetSummaryData . getPartSubsistenceCostSharing ( ) . bigDecimalValue ( ) ) ; } } budgetSummary . setCumulativeTraineeSubsistence ( totalSubsistence ) ; TotalDataType totalOtherTrainee = TotalDataType . Factory . newInstance ( ) ; if ( budgetSummaryData . getpartOtherCost ( ) != null ) { totalOtherTrainee . setFederal ( budgetSummaryData . getpartOtherCost ( ) . bigDecimalValue ( ) ) ; } if ( budgetSummaryData . getPartOtherCostSharing ( ) != null ) { totalOtherTrainee . setNonFederal ( budgetSummaryData . getPartOtherCostSharing ( ) . bigDecimalValue ( ) ) ; if ( budgetSummaryData . getpartOtherCost ( ) != null ) { totalOtherTrainee . setTotalFedNonFed ( budgetSummaryData . getpartOtherCost ( ) . add ( budgetSummaryData . getPartOtherCostSharing ( ) ) . bigDecimalValue ( ) ) ; } else { totalOtherTrainee . setTotalFedNonFed ( budgetSummaryData . getPartOtherCostSharing ( ) . bigDecimalValue ( ) ) ; } } budgetSummary . setCumulativeOtherTraineeCost ( totalOtherTrainee ) ; budgetSummary . setCumulativeNoofTrainees ( budgetSummaryData . getparticipantCount ( ) ) ; } budgetSummary . setCumulativeTotalFundsRequestedTraineeCosts ( summaryTraineeCosts ) ; }
This method gets CumulativeTrainee details,
CumulativeTotalFundsRequestedTraineeCosts,CumulativeTraineeTuitionFeesHealthInsurance
CumulativeTraineeStipends,CumulativeTraineeTravel,CumulativeTraineeSubsistence,CumulativeOtherTraineeCost and
CumulativeNoofTrainees based on BudgetSummaryInfo for the RRFedNonFedBudget.

@param budgetSummaryData (BudgetSummaryInfo) budget summary entry.