Examples of Volunteer


Examples of org.spw.model.Volunteer

        instance.setArchived(false);
        instance.refreshList();
       
        assertTrue(instance.getList().size() > 0);
        for (Object object: instance.getList()) {
            Volunteer volunteer = (Volunteer) object;
            assertTrue("year applying is incorrect, expected " + year + ", found " +
                    volunteer.getYearApplyingFor(), volunteer.getYearApplyingFor() >= year);
        }
       
        instance.setArchived(true);
        instance.refreshList();
       
        assertTrue(instance.getList().size() > 0);
        boolean isArchivedFound = false;
        for (Object object: instance.getList()) {
            Volunteer volunteer = (Volunteer) object;
            isArchivedFound = (volunteer.getYearApplyingFor() < year);
            if (isArchivedFound)
                break;
        }
        assertTrue("Can't find any archived volunteer", isArchivedFound);
    }
View Full Code Here

Examples of org.spw.model.Volunteer

        VolunteerApplication application = new VolunteerApplication();
        application.setIdApplication(TEST_ID);
        application.setProgram(testProgram1);
       
        // Create and persist the volunteer
        Volunteer volunteer = new Volunteer();
        volunteer.setIdContact(TEST_ID);
        volunteer.setFirstName(getName());
        volunteer.setLastName(getName());
        volunteer.setTypeVolunteer("Potential");
        volunteer = volunteerCtrl.update(volunteer);
       
        // test the method
        instance.persist(volunteer, application, null);
View Full Code Here

Examples of org.spw.model.Volunteer

       
        for ( Object obj : prop.values() ) {
          System.out.println( "Property: " + obj.toString() );
        }
        Set<Contact> set = new HashSet<Contact>();
        Contact contact1 = new Volunteer();
        String sMailTo = prop.getProperty( "mail.to");
        contact1.setEmail( sMailTo);
        contact1.setFirstName("Patrice");
        contact1.setIdContact(1L);
        Contact contact2 = new Partnership();
        contact2.setEmail( "Pablo@localhost" );
        contact2.setFirstName("Pablo");
        contact2.setIdContact(2L);
        set.add(contact1);
View Full Code Here

Examples of org.spw.model.Volunteer

            getSessionBean1().getCommunicationDataProvider().refreshListCommunicationsContact();
            // Set the contribution data provider for this contact
            getSessionBean1().getContributionDataProvider().clearObjectList();
            if (getSessionBean1().getPerson() != null &&
                    (getSessionBean1().getPerson() instanceof Volunteer)) {
                Volunteer volunteer = ((Volunteer) getSessionBean1().getPerson());
                if (volunteer.getApplication() != null) {
                    getSessionBean1().getContributionDataProvider().
                            setApplication(volunteer.getApplication());
                    getSessionBean1().getContributionDataProvider().refreshList();
                }
            }
        }
    }
View Full Code Here

Examples of org.spw.model.Volunteer

        Person person = getSessionBean1().getPerson();
        // if Person, create an instance of Volunteer
        if (person instanceof Volunteer) {
            return null;
        } else {
            getSessionBean1().setVolunteer(new Volunteer((Person) person));
        }
       
        return "editVolunteer";
    }
View Full Code Here

Examples of org.spw.model.Volunteer

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

Examples of org.spw.model.Volunteer

    }
   
    public String buttonInfo_action() {
        RowKey rk = tableRowGroup1.getRowKey();
        if (rk != null) {
            Volunteer volunteer = (Volunteer)list.getObject(rk);
            getSessionBean1().setPerson(volunteer);
        }
       
        return "info";
    }
View Full Code Here

Examples of org.spw.model.Volunteer

    }
   
    public String buttonApplication_action() {
        RowKey rk = tableRowGroup1.getRowKey();
        if (rk != null) {
            Volunteer volunteer = (Volunteer)list.getObject(rk);
            getSessionBean1().setVolunteer(volunteer);
            getSessionBean1().setVolunteerApplication(volunteer.getApplication());
        }
       
        return null;
    }
View Full Code Here

Examples of org.spw.model.Volunteer

    }
   
    public String buttonDelete_action() {
        RowKey rk = tableRowGroup1.getRowKey();
        if (rk != null) {
            Volunteer volunteer = (Volunteer) list.getObject(rk);
            new VolunteerController().delete(volunteer);
        }
        try {
            list.refreshList();
        } catch (CriteriaException ex) {
View Full Code Here

Examples of org.spw.model.Volunteer

    /**
     * Creates a new instance of VolunteerDataProvider
     */
    public VolunteerDataProvider() {
        // Put in dummy data for design time
        aList.add(new Volunteer());
       
        // Wrap the list
        setList(aList);
    }
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.