Package org.spw.model

Examples of org.spw.model.Contact


    public String buttonEditCommunication_action() {
        RowKey rk = tableRowGroup1.getRowKey();
        if (rk != null) {
            Communication communication = (Communication) actionsNotCompletedList.getObject(rk);
            if (! communication.getParticipants().isEmpty()) {
                Contact contact = communication.getParticipants().get(0);
                if (contact instanceof Partnership) {
                    getSessionBean1().setPartnership((Partnership) contact);
                    return "infoPartnership";
                } else if (contact instanceof Person) {
                    getSessionBean1().setPerson((Person) contact);
View Full Code Here


       
        return null;
    }
   
    private void deleteCommunication(Communication communication) {
        Contact contact = getContact();
        contact.getParticipate().remove(communication);
        new ContactController().update(contact);
        new CommunicationController().delete(communication);
       
    }
View Full Code Here

    final private List<Contact> aList;

    public ContactDataProvider() {
        // Put in dummy data for design time
        aList = new ArrayList();
        aList.add(new Contact());       
        // Wrap the list
        setList(aList);
    }
View Full Code Here

     * Creates a new instance of AttendedDataProvider
     */
    public AttendedDataProvider() {
        this.event = null;
        // Put in dummy data for design time
        aList.add(new Contact());
       
        // Wrap the list
        setList(aList);
    }
View Full Code Here

     * Creates a new instance of AttendedDataProvider
     */
    public AttendedDataProvider(Event event) {
        this.event = event;
        // Put in dummy data for design time
        aList.add(new Contact());
       
        // Wrap the list
        setList(aList);
    }
View Full Code Here

     * Creates a new instance of AttendedDataProvider
     */
    public OrganizedByDataProvider() {
        this.event = null;
        // Put in dummy data for design time
        aList.add(new Contact());
       
        // Wrap the list
        setList(aList);
    }
View Full Code Here

     * Creates a new instance of AttendedDataProvider
     */
    public OrganizedByDataProvider(Event event) {
        this.event = event;
        // Put in dummy data for design time
        aList.add(new Contact());
       
        // Wrap the list
        setList(aList);
    }
View Full Code Here

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

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

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

TOP

Related Classes of org.spw.model.Contact

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.