Examples of VolunteerApplication


Examples of org.spw.model.VolunteerApplication

        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());
        va.setVolunteer(vo);
        va.setProgram(prg);
        va = vaCtrl.update(va);
       
        vCtrl.addApplication(vo, va, prg);
    }
View Full Code Here

Examples of org.spw.model.VolunteerApplication

    /**
     * Creates a new instance of VolunteerApplicationDataProvider
     */
    public VolunteerApplicationDataProvider() {
        // Put in dummy data for design time
        aList.add(new VolunteerApplication());

        // Wrap the list
        setList(aList);       
    }
View Full Code Here

Examples of org.spw.model.VolunteerApplication

    public String getAsString(FacesContext context, UIComponent component, Object value) {
        if (value == null) return null;
        if (!(value instanceof VolunteerApplication)) {
            throw new ConverterException("Error converting Application, got a " + value.getClass().getName());
        }
        VolunteerApplication obj = (VolunteerApplication) value;
        return obj.getIdApplication().toString();
    }
View Full Code Here

Examples of org.spw.model.VolunteerApplication

       
        // </editor-fold>
        // Perform application initialization that must complete
        // *after* managed components are initialized
        if (getSessionBean1().getVolunteerApplication() == null) {
            getSessionBean1().setVolunteerApplication(new VolunteerApplication());
        }
    }
View Full Code Here

Examples of org.spw.model.VolunteerApplication

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

Examples of org.spw.model.VolunteerApplication

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

Examples of org.spw.model.VolunteerApplication

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

Examples of org.spw.model.VolunteerApplication

        return result;
    }
   

    public VolunteerApplication addContribution(VolunteerApplication object, Contribution contribution) {
        VolunteerApplication result = null;
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        try {
            object.addContribution(contribution);
            result = em.merge(object);
View Full Code Here

Examples of org.spw.model.VolunteerApplication

        }
        return result;
    }

    public VolunteerApplication removeContribution(VolunteerApplication object, Contribution contribution) {
        VolunteerApplication result = null;
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        try {
            contribution = em.find(Contribution.class, contribution.getIdContribution());
            object.removeContribution(contribution);
View Full Code Here

Examples of org.spw.model.VolunteerApplication

   
    public void delete(VolunteerApplication object) {
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        try {
            VolunteerApplication entity = em.find(VolunteerApplication.class, object.getIdApplication());
            em.remove(entity);
            em.getTransaction().commit();
        } catch (Exception e) {
            Logger.getLogger(VolunteerApplicationController.class.getName()).log(Level.SEVERE, "Error deleting " + object, e);
            if (em.getTransaction().isActive())
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.