org.kuali.kra.budget.calculator

Class AbstractBudgetCalculator

    • Constructor Detail

      • AbstractBudgetCalculator

        public AbstractBudgetCalculator(Budget budget,
                                BudgetLineItemBase budgetLineItem)
        Constructs a CalculatorBase.java.
        Parameters:
        budget -
        budgetLineItem -
    • Method Detail

      • populateApplicableCosts

        public abstract void populateApplicableCosts(Boundary boundary)
        Abstract method to populate the applicable cost and applicable cost sharing in boundary. For LineItemCalculator, applicableCost would be the line item cost and for PersonnelLineItemCalculator applicable cost would be cumulative salary of all personnel line item
        Parameters:
        boundary -
      • filterRates

        public QueryList filterRates(List rates)
        This method is for filtering rates and lab allocation rates.
        Parameters:
        rates -
        Returns:
      • calculate

        public void calculate()
        This method does the calculation for each line item. Both BudgetLineItem and BudgetPersonnelLineItem invokes this method to do the calculation.
      • populateBudgetRateBaseList

        protected abstract void populateBudgetRateBaseList()
        This abstract method should be implemented by LineItemCalculator and PersonnelLineItemCalculator. It is for populating the RateAndBase amounts.
      • updateBudgetLineItemCalculatedAmounts

        protected void updateBudgetLineItemCalculatedAmounts()
        This method is for populating the calculated amounts by looking at the rate class and rate type for each line item gets applied to.
      • createAndCalculateBreakupIntervals

        protected void createAndCalculateBreakupIntervals()
      • createBreakUpInterval

        protected void createBreakUpInterval()
        Combine the sorted Prop & LA rates, which should be in sorted order(asc). Now create the breakup boundaries and use it to create breakup intervals and set all the values required for calculation. Then call calculateBreakupInterval method for each AmountBean for setting the calculated cost & calculated cost sharing ie for each rate class & rate type.
      • createBreakupBoundaries

        public List<Boundary> createBreakupBoundaries(QueryList<AbstractBudgetRate> qlCombinedRates,
                                             Date liStartDate,
                                             Date liEndDate)
        Use the combined & sorted Prop & LA rates to create Boundary objects. Each Boundary will contain start date & end date. Check whether any rate changes, and break at this point to create a new boundary.
        Returns:
        List of boundary objects
      • calculateBreakUpInterval

        protected void calculateBreakUpInterval()
      • populateCalculatedAmountLineItems

        protected abstract void populateCalculatedAmountLineItems()
      • setInfltionValidCalcCeRates

        protected void setInfltionValidCalcCeRates(QueryList<ValidCeRateType> infltionValidCalcCeRates)
      • getBusinessObjectService

        public org.kuali.rice.krad.service.BusinessObjectService getBusinessObjectService()
        Gets the businessObjectService attribute.
        Returns:
        Returns the businessObjectService.
      • setBusinessObjectService

        public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
        Sets the businessObjectService attribute value.
        Parameters:
        businessObjectService - The businessObjectService to set.
      • setBreakupIntervals

        protected void setBreakupIntervals(List<BreakUpInterval> breakupIntervals)
      • getDateTimeService

        protected org.kuali.rice.core.api.datetime.DateTimeService getDateTimeService()
      • getUnderrecoveryRates

        public QueryList<BudgetRate> getUnderrecoveryRates()
        Gets the underrecoveryRates attribute.
        Returns:
        Returns the underrecoveryRates.
      • setUnderrecoveryRates

        public void setUnderrecoveryRates(QueryList<BudgetRate> underrecoveryRates)
        Sets the underrecoveryRates attribute value.
        Parameters:
        underrecoveryRates - The underrecoveryRates to set.
      • getQlLineItemPropLaRates

        public QueryList<BudgetLaRate> getQlLineItemPropLaRates()
        Gets the qlLineItemPropLaRates attribute.
        Returns:
        Returns the qlLineItemPropLaRates.
      • setQlLineItemPropLaRates

        public void setQlLineItemPropLaRates(QueryList<BudgetLaRate> qlLineItemPropLaRates)
        Sets the qlLineItemPropLaRates attribute value.
        Parameters:
        qlLineItemPropLaRates - The qlLineItemPropLaRates to set.
      • getQlLineItemPropRates

        public QueryList<BudgetRate> getQlLineItemPropRates()
        Gets the qlLineItemPropRates attribute.
        Returns:
        Returns the qlLineItemPropRates.
      • setQlLineItemPropRates

        public void setQlLineItemPropRates(QueryList<BudgetRate> qlLineItemPropRates)
        Sets the qlLineItemPropRates attribute value.
        Parameters:
        qlLineItemPropRates - The qlLineItemPropRates to set.
      • getBudgetFormFromGlobalVariables

        protected BudgetForm getBudgetFormFromGlobalVariables()

Copyright © 2013 The Kuali Foundation. All Rights Reserved.