Package org.openmeetings.app.persistence.beans.calendar

Examples of org.openmeetings.app.persistence.beans.calendar.AppointmentCategory


      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
          .getAppointmentCategoryById(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.getUser(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
          .getAppointmentCategoryById(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

TOP

Related Classes of org.openmeetings.app.persistence.beans.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.