Package org.spw.model

Examples of org.spw.model.Program


        VolunteerApplication application = getSessionBean1().getVolunteer().getApplication();
        if (application == null) {
            return null;
        }
        getSessionBean1().setVolunteerApplication(application);
        Program program = application.getProgram();
        getSessionBean1().setProgram(program);
       
        return "application";
    }
View Full Code Here


    }
   
    public String buttonValidate_action() {
        VolunteerApplication application = getVolunteerApplication();
        Volunteer volunteer = getVolunteer();
        Program previousProgram = getProgram();
        persist(volunteer, application, previousProgram);
       
        return "success";
    }
View Full Code Here

        vo.setLastName(getName());
        vo.setYearApplyingFor(1900);
        vo.setTypeVolunteer("Accepted");
        vo = vCtrl.update(vo);
       
        Program prg = new Program();
        prg.setProgram(getName());
        Calendar cal = Calendar.getInstance();
        cal.clear();
        cal.set(1900,5,1);
        prg.setStartDate(cal.getTime());
        prg.setNumberVolunteer(12);
        prg.setProgramAcronym("TEST");
        prg = prgCtrl.update(prg);
       
        VolunteerApplication va = new VolunteerApplication();
        va.setAcceptanceFeeReceived(new Date());
        va.setAcceptanceLettersSent(new Date());
View Full Code Here

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

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

   
    public void delete(Program object) {
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        try {
            Program entity = em.find(Program.class, object.getIdProgram());
            em.remove(entity);
            em.getTransaction().commit();
        } catch (Exception e) {
            Logger.getLogger(ProgramController.class.getName()).log(Level.SEVERE, "Error deleting " + object, e);
            if (em.getTransaction().isActive())
View Full Code Here

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

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

        }
        return "edit";
    }
   
    public String buttonAdd_action() {
        getSessionBean1().setProgram(new Program());
       
        return "new";
    }
View Full Code Here

    }
   
    public String buttonVolunteer_action() {
        RowKey rk = tableRowGroup1.getRowKey();
        if (rk != null) {
            Program program = (Program)list.getObject(rk);
            getSessionBean1().setProgram(program);
            java.util.List<Volunteer> contacts = new ArrayList();
            for (VolunteerApplication application : program.getApplications()) {
                contacts.add(application.getVolunteer());
            }
            getSessionBean1().getContactDataProvider().
                    setContactList(contacts);
        }
View Full Code Here

TOP

Related Classes of org.spw.model.Program

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.