Package org.spw.model

Examples of org.spw.model.Fundraising


    public String buttonDelete_action() {
        RowKey rk = tableRowGroup1.getRowKey();
        if (rk != null) {
            FundraisingController ctrl = new FundraisingController();
            Fundraising fundraising = (Fundraising)list.getObject(rk);
            ctrl.delete(fundraising);
            list.refreshList();
        }
       
        return null;
View Full Code Here


       
        return null;
    }

    public String buttonAdd_action() {
        getSessionBean1().setFundraising(new Fundraising());
        return "new";
    }
View Full Code Here

    }

    public String buttonPlan_action() {
        RowKey rk = tableRowGroup1.getRowKey();
        if (rk != null) {
            Fundraising fundraising = (Fundraising)list.getObject(rk);
            getSessionBean1().setFundraising(fundraising);
        }
       
        return "plan";
    }
View Full Code Here

    }

    public String buttonEdit_action() {
        RowKey rk = tableRowGroup1.getRowKey();
        if (rk != null) {
            Fundraising fundraising = (Fundraising)list.getObject(rk);
            getSessionBean1().setFundraising(fundraising);
        }
       
        return "edit";
    }
View Full Code Here

    /**
     * Creates a new instance of FundraisingDataProvider
     */
    public FundraisingDataProvider() {
        // Put in dummy data for design time
        aList.add(new Fundraising());
       
        // Wrap the list
        setList(aList);
    }
View Full Code Here

     * Creates a new instance of VolunteerDetailsFundraisingXmlReport
     */
    public VolunteerSummaryFundraisingXmlReport(int year) {
        this.year = year;
        //check the fundraising of this year
        Fundraising fundraising = new FundraisingController().read(year);
        target = (fundraising != null)? fundraising.getTarget() : new BigDecimal(0);
       
        programs = new ProgramController().getProgramsYear(year);
        volunteersByMonth = new ArrayList[13];
        Calendar cal = Calendar.getInstance();
        for (Program program: programs) {
View Full Code Here

    /**
     * Creates a new instance of FundraisingDataProvider
     */
    public FundraisingDataProvider() {
        // Put in dummy data for design time
        aList.add(new Fundraising());
       
        // Wrap the list
        setList(aList);
    }
View Full Code Here

        }
    }
   
    public Fundraising read(Integer key) {
        EntityManager em = emf.createEntityManager();
        Fundraising retValue = null;
        try {
            retValue = em.find(Fundraising.class, key);
        } catch (Exception e) {
            Logger.getLogger(FundraisingController.class.getName()).log(Level.SEVERE, "Error reading " + key, e);
            if (em.getTransaction().isActive())
View Full Code Here

        }
        return retValue;
    }
   
    public Fundraising update(Fundraising object) {
        Fundraising result = null;
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        try {
            result = em.merge(object);
            em.getTransaction().commit();
View Full Code Here

   
    public void delete(Fundraising object) {
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        try {
            Fundraising entity = em.find(Fundraising.class, object.getYearFunding());
            em.remove(entity);
            em.getTransaction().commit();
        } catch (Exception e) {
            Logger.getLogger(FundraisingController.class.getName()).log(Level.SEVERE, "Error deleting " + object, e);
            if (em.getTransaction().isActive())
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.