private CumulativeTravels getCumulativeTravels ( BudgetSummaryDto budgetSummaryData ) { CumulativeTravels cumulativeTravels = CumulativeTravels . Factory . newInstance ( ) ; SummaryDataType summary = SummaryDataType . Factory . newInstance ( ) ; if ( budgetSummaryData != null ) { if ( budgetSummaryData . getCumTravel ( ) != null ) { summary . setFederalSummary ( budgetSummaryData . getCumTravel ( ) . bigDecimalValue ( ) ) ; } if ( budgetSummaryData . getCumTravelNonFund ( ) != null ) { summary . setNonFederalSummary ( budgetSummaryData . getCumTravelNonFund ( ) . bigDecimalValue ( ) ) ; if ( budgetSummaryData . getCumTravel ( ) != null ) { summary . setTotalFedNonFedSummary ( budgetSummaryData . getCumTravel ( ) . add ( budgetSummaryData . getCumTravelNonFund ( ) ) . bigDecimalValue ( ) ) ; } else { summary . setTotalFedNonFedSummary ( budgetSummaryData . getCumTravelNonFund ( ) . bigDecimalValue ( ) ) ; } } TotalDataType totalDomestic = TotalDataType . Factory . newInstance ( ) ; if ( budgetSummaryData . getCumDomesticTravel ( ) != null ) { totalDomestic . setFederal ( budgetSummaryData . getCumDomesticTravel ( ) . bigDecimalValue ( ) ) ; } if ( budgetSummaryData . getCumDomesticTravelNonFund ( ) != null ) { totalDomestic . setNonFederal ( budgetSummaryData . getCumDomesticTravelNonFund ( ) . bigDecimalValue ( ) ) ; if ( budgetSummaryData . getCumDomesticTravel ( ) != null ) { totalDomestic . setTotalFedNonFed ( budgetSummaryData . getCumDomesticTravel ( ) . add ( budgetSummaryData . getCumDomesticTravelNonFund ( ) ) . bigDecimalValue ( ) ) ; } else { totalDomestic . setTotalFedNonFed ( budgetSummaryData . getCumDomesticTravelNonFund ( ) . bigDecimalValue ( ) ) ; } } cumulativeTravels . setCumulativeDomesticTravelCosts ( totalDomestic ) ; TotalDataType totalForeign = TotalDataType . Factory . newInstance ( ) ; if ( budgetSummaryData . getCumForeignTravel ( ) != null ) { totalForeign . setFederal ( budgetSummaryData . getCumForeignTravel ( ) . bigDecimalValue ( ) ) ; } if ( budgetSummaryData . getCumForeignTravelNonFund ( ) != null ) { totalForeign . setNonFederal ( budgetSummaryData . getCumForeignTravelNonFund ( ) . bigDecimalValue ( ) ) ; if ( budgetSummaryData . getCumForeignTravel ( ) != null ) { totalForeign . setTotalFedNonFed ( budgetSummaryData . getCumForeignTravel ( ) . add ( budgetSummaryData . getCumForeignTravelNonFund ( ) ) . bigDecimalValue ( ) ) ; } else { totalForeign . setTotalFedNonFed ( budgetSummaryData . getCumForeignTravelNonFund ( ) . bigDecimalValue ( ) ) ; } } cumulativeTravels . setCumulativeForeignTravelCosts ( totalForeign ) ; } cumulativeTravels . setCumulativeTotalFundsRequestedTravel ( summary ) ; return cumulativeTravels ; }
This method gets CumulativeTravels details CumulativeTotalFundsRequestedTravel CumulativeDomesticTravelCosts and CumulativeForeignTravelCosts based on BudgetSummaryInfo for the RRFedNonFedBudget .