Examples of UserContacts


Examples of org.openmeetings.app.persistence.beans.user.UserContacts

            Boolean shareCalendar = importBooleanType(unformatString(usercontact
                .element("shareCalendar").getText()));
            Long userContactId = importLongType(unformatString(usercontact
                .element("userContactId").getText()));

            UserContacts userContacts = new UserContacts();
            userContacts.setHash(hash);
            userContacts.setContact(contact);
            userContacts.setOwner(owner);
            userContacts.setPending(pending);
            userContacts.setShareCalendar(shareCalendar);
            userContacts.setUserContactId(userContactId);

            ucList.add(userContacts);

          }
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.user.UserContacts

    private Usermanagement userManagement;

  public Long addUserContact(Long user_id, Long ownerId, Boolean pending, String hash) {
    try {
     
      UserContacts userContact = new UserContacts();
      userContact.setInserted(new Date());
      userContact.setOwner(userManagement.getUserById(ownerId));
      userContact.setContact(userManagement.getUserById(user_id));
      userContact.setPending(pending);
      userContact.setHash(hash);
     
      userContact = em.merge(userContact);
      Long userContactId = userContact.getUserContactId();
     
      return userContactId;     
    } catch (Exception e) {
      log.error("[addUserContact]",e);
    }
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.user.UserContacts

      String hql = "select c from UserContacts c " +
              "where c.userContactId = :userContactId";
     
      TypedQuery<UserContacts> query = em.createQuery(hql, UserContacts.class);
      query.setParameter("userContactId", userContactId);
      UserContacts userContacts = null;
      try {
        userContacts = query.getSingleResult();
        } catch (NoResultException ex) {
        }
     
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.user.UserContacts

  }
 
  public Long updateContactStatus(Long userContactId, Boolean pending) {
    try {
     
      UserContacts userContacts = this.getUserContacts(userContactId);
     
      if (userContacts == null) {
        return null;
      }
      userContacts.setPending(pending);
      userContacts.setUpdated(new Date());
     
      if (userContacts.getUserContactId() == 0) {
        em.persist(userContacts);
        } else {
          if (!em.contains(userContacts)) {
            em.merge(userContacts);
          }
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.user.UserContacts

    Element root = document.addElement("root");

    Element usercontacts = root.addElement("usercontacts");

    for (Iterator<UserContacts> it = userContacts.iterator(); it.hasNext();) {
      UserContacts uc = it.next();

      Element usercontact = usercontacts.addElement("usercontact");

      usercontact.addElement("userContactId").addCDATA(
          formatString("" + uc.getUserContactId()));
      usercontact.addElement("hash").addCDATA(
          formatString("" + uc.getHash()));
      if (uc.getContact() != null) {
        usercontact.addElement("contact").addCDATA(
            formatString("" + uc.getContact().getUser_id()));
      } else {
        usercontact.addElement("contact").addCDATA("0");
      }
      if (uc.getOwner() != null) {
        usercontact.addElement("owner").addCDATA(
            formatString("" + uc.getOwner().getUser_id()));
      } else {
        usercontact.addElement("owner").addCDATA("0");
      }
      usercontact.addElement("pending").addCDATA(
          formatString("" + uc.getPending()));
      usercontact.addElement("shareCalendar").addCDATA(
          formatString("" + uc.getShareCalendar()));

    }

    return document;
  }
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.