Package org.spw.model

Examples of org.spw.model.Fundraising


     */
    public FundraisingPlan[] getFundraisingsPlan(int year, int monthSelected) {
        if (monthSelected < 1 || monthSelected > 12)
            throw new IllegalArgumentException("Month selected in fundraising plan should be from 1 to 12, found " + monthSelected);
        EntityManager em = emf.createEntityManager();
        Fundraising fundraising = null;
        FundraisingPlan[] monthPlan = new FundraisingPlan[12];
        try {
            fundraising = em.find(Fundraising.class, year);
            if (fundraising == null)
                throw new IllegalArgumentException("The fundraising does not exist for this year " + year);
           
           
            for (FundraisingPlan p : fundraising.getFundraisingPlans()) {
                if (p.getMonthSelected() == monthSelected) {
                    monthPlan[p.getMonthFunding()-1] = p;
                }
            }
            // add the new ones (begin from the selected month, can't be before
View Full Code Here


        } else {
            year = volunteer.getYearApplyingFor();
        }
       
        FundraisingController ctrl = new FundraisingController();
        Fundraising fundraising = ctrl.read(year);
        if (fundraising == null) {
            return new BigDecimal(3600);
        }
        return fundraising.getTarget();
    }
View Full Code Here

TOP

Related Classes of org.spw.model.Fundraising

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.