Package org.apache.openmeetings.db.entity.calendar

Examples of org.apache.openmeetings.db.entity.calendar.AppointmentCategory


        if (res == null || res.size() < 1)
          log.debug("no AppointmentCategories found");
        else {
          for (int i = 0; i < res.size(); i++) {
            AppointmentCategory ac = res.get(i);
            log.debug("found appCategory : " + ac.getName());
          }
        }

        return res;
      } else {
View Full Code Here


      TypedQuery<AppointmentCategory> query = em.createQuery(hql, AppointmentCategory.class);
      query.setParameter("deleted", true);
      query.setParameter("categoryId", categoryId);

      AppointmentCategory appointCategory = null;
      try {
        appointCategory = query.getSingleResult();
      } catch (NoResultException ex) {
      }
View Full Code Here

  }

  public Long updateAppointmentCategory(Long categoryId, String name) {
    try {

      AppointmentCategory ac = this
          .get(categoryId);

      ac.setName(name);
      ac.setUpdatetime(new Date());

      if (ac.getCategoryId() == null) {
        em.persist(ac);
      } else {
        if (!em.contains(ac)) {
          em.merge(ac);
        }
View Full Code Here

  }

  public Long addAppointmentCategory(Long user_id, String name, String comment) {
    try {

      AppointmentCategory ac = new AppointmentCategory();

      ac.setName(name);
      ac.setStarttime(new Date());
      ac.setDeleted(false);
      ac.setUser(usersDao.get(user_id));
      ac.setComment(comment);

      ac = em.merge(ac);
      Long category_id = ac.getCategoryId();

      return category_id;
    } catch (Exception ex2) {
      log.error("[addAppointmentCategory]: ", ex2);
    }
View Full Code Here

  }

  public Long deleteAppointmentCategory(Long categoryId) {
    try {

      AppointmentCategory ac = this
          .get(categoryId);

      log.debug("ac: " + ac);

      if (ac == null) {
        log.debug("Already deleted / Could not find: " + categoryId);
        return categoryId;
      }
      ac.setUpdatetime(new Date());
      ac.setDeleted(true);
      if (ac.getCategoryId() == null) {
        em.persist(ac);
      } else {
        if (!em.contains(ac)) {
          em.merge(ac);
        }
View Full Code Here

        if (res == null || res.size() < 1)
          log.debug("no AppointmentCategories found");
        else {
          for (int i = 0; i < res.size(); i++) {
            AppointmentCategory ac = res.get(i);
            log.debug("found appCategory : " + ac.getName());
          }
        }

        return res;
      } else {
View Full Code Here

        if (res == null || res.size() < 1)
          log.debug("no AppointmentCategories found");
        else {
          for (int i = 0; i < res.size(); i++) {
            AppointmentCategory ac = res.get(i);
            log.debug("found appCategory : " + ac.getName());
          }
        }

        return res;
      } else {
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.db.entity.calendar.AppointmentCategory

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.