Package org.apache.openmeetings.db.entity.user

Examples of org.apache.openmeetings.db.entity.user.Userdata


    }
    return null;
  }

  public Userdata getUserdataByKey(Long user_id, String DATA_KEY) {
    Userdata userdata = new Userdata();
    if (user_id.longValue() > 0) {
      try {
        TypedQuery<Userdata> query = em
            .createQuery("select c from Userdata as c where c.user_id = :user_id AND c.data_key = :data_key AND c.deleted <> :deleted", Userdata.class);
        query.setParameter("user_id", user_id.longValue());
        query.setParameter("data_key", DATA_KEY);
        query.setParameter("deleted", true);
        for (Iterator<Userdata> it2 = query.getResultList().iterator(); it2
            .hasNext();) {
          userdata = it2.next();
        }
      } catch (Exception ex2) {
        log.error("getUserdataByKey", ex2);
      }
    } else {
      userdata.setComment("Error: No USER_ID given");
    }
    return userdata;
  }
View Full Code Here


  }

  public String addUserdata(long USER_ID, String DATA_KEY, String DATA,
      String Comment) {
    String ret = "Fehler beim speichern der Userdata";
    Userdata userdata = new Userdata();
    userdata.setData_key(DATA_KEY);
    userdata.setData(DATA);
    userdata.setStarttime(new Date());
    userdata.setUpdatetime(null);
    userdata.setComment(Comment);
    userdata.setUser_id(new Long(USER_ID));
    userdata.setDeleted(false);
    try {
      userdata = em.merge(userdata);
      ret = "success";
    } catch (Exception ex2) {
      log.error("addUserdata", ex2);
View Full Code Here

    }
    return null;
  }

  public Userdata getUserdataByKey(Long user_id, String DATA_KEY) {
    Userdata userdata = new Userdata();
    if (user_id.longValue() > 0) {
      try {
        TypedQuery<Userdata> query = em
            .createQuery("select c from Userdata as c where c.user_id = :user_id AND c.data_key = :data_key AND c.deleted <> :deleted", Userdata.class);
        query.setParameter("user_id", user_id.longValue());
        query.setParameter("data_key", DATA_KEY);
        query.setParameter("deleted", true);
        for (Iterator<Userdata> it2 = query.getResultList().iterator(); it2
            .hasNext();) {
          userdata = it2.next();
        }
      } catch (Exception ex2) {
        log.error("getUserdataByKey", ex2);
      }
    } else {
      userdata.setComment("Error: No USER_ID given");
    }
    return userdata;
  }
View Full Code Here

  }

  public String addUserdata(long USER_ID, String DATA_KEY, String DATA,
      String Comment) {
    String ret = "Fehler beim speichern der Userdata";
    Userdata userdata = new Userdata();
    userdata.setData_key(DATA_KEY);
    userdata.setData(DATA);
    userdata.setStarttime(new Date());
    userdata.setUpdatetime(null);
    userdata.setComment(Comment);
    userdata.setUser_id(new Long(USER_ID));
    userdata.setDeleted(false);
    try {
      userdata = em.merge(userdata);
      ret = "success";
    } catch (Exception ex2) {
      log.error("addUserdata", ex2);
View Full Code Here

    }
    return null;
  }

  public Userdata getUserdataByKey(Long user_id, String DATA_KEY) {
    Userdata userdata = new Userdata();
    if (user_id.longValue() > 0) {
      try {
        TypedQuery<Userdata> query = em
            .createQuery("select c from Userdata as c where c.user_id = :user_id AND c.data_key = :data_key AND c.deleted <> :deleted", Userdata.class);
        query.setParameter("user_id", user_id.longValue());
        query.setParameter("data_key", DATA_KEY);
        query.setParameter("deleted", true);
        for (Iterator<Userdata> it2 = query.getResultList().iterator(); it2
            .hasNext();) {
          userdata = it2.next();
        }
      } catch (Exception ex2) {
        log.error("getUserdataByKey", ex2);
      }
    } else {
      userdata.setComment("Error: No USER_ID given");
    }
    return userdata;
  }
View Full Code Here

  }

  public String addUserdata(long USER_ID, String DATA_KEY, String DATA,
      String Comment) {
    String ret = "Fehler beim speichern der Userdata";
    Userdata userdata = new Userdata();
    userdata.setData_key(DATA_KEY);
    userdata.setData(DATA);
    userdata.setStarttime(new Date());
    userdata.setUpdatetime(null);
    userdata.setComment(Comment);
    userdata.setUser_id(new Long(USER_ID));
    userdata.setDeleted(false);
    try {
      userdata = em.merge(userdata);
      ret = "success";
    } catch (Exception ex2) {
      log.error("addUserdata", ex2);
View Full Code Here

    }
    return null;
  }

  public Userdata getUserdataByKey(Long user_id, String DATA_KEY) {
    Userdata userdata = new Userdata();
    if (user_id.longValue() > 0) {
      try {
        TypedQuery<Userdata> query = em
            .createQuery("select c from Userdata as c where c.user_id = :user_id AND c.data_key = :data_key AND c.deleted <> :deleted", Userdata.class);
        query.setParameter("user_id", user_id.longValue());
        query.setParameter("data_key", DATA_KEY);
        query.setParameter("deleted", true);
        for (Iterator<Userdata> it2 = query.getResultList().iterator(); it2
            .hasNext();) {
          userdata = it2.next();
        }
      } catch (Exception ex2) {
        log.error("getUserdataByKey", ex2);
      }
    } else {
      userdata.setComment("Error: No USER_ID given");
    }
    return userdata;
  }
View Full Code Here

  }

  public String addUserdata(long USER_ID, String DATA_KEY, String DATA,
      String Comment) {
    String ret = "Fehler beim speichern der Userdata";
    Userdata userdata = new Userdata();
    userdata.setData_key(DATA_KEY);
    userdata.setData(DATA);
    userdata.setStarttime(new Date());
    userdata.setUpdatetime(null);
    userdata.setComment(Comment);
    userdata.setUser_id(new Long(USER_ID));
    userdata.setDeleted(false);
    try {
      userdata = em.merge(userdata);
      ret = "success";
    } catch (Exception ex2) {
      log.error("addUserdata", ex2);
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.db.entity.user.Userdata

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.