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

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


      String baseUrl, Long language_id, String iCalTimeZone) {

    log.debug("AppointmentDAOImpl.updateAppointment");
    try {

      Appointment ap = this.getAppointmentById(appointmentId);

      // change connected events of other participants
      if (ap.getIsConnectedEvent() != null && ap.getIsConnectedEvent()) {
        this.updateConnectedEventsTimeOnly(ap, appointmentstart,
            appointmentend);
      }

      // Update Invitation hash to new time
      invitationManagement.updateInvitationByAppointment(appointmentId,
          appointmentstart, appointmentend);

      ap.setAppointmentStarttime(appointmentstart);
      ap.setAppointmentEndtime(appointmentend);
      ap.setUpdatetime(new Date());

      if (ap.getAppointmentId() == null) {
        em.persist(ap);
      } else {
        if (!em.contains(ap)) {
          em.merge(ap);
        }
      }

      List<MeetingMember> meetingsRemoteMembers = meetingMemberDao
          .getMeetingMemberByAppointmentId(ap.getAppointmentId());

      // Adding Invitor Name
      Users user = userManagement.getUserById(users_id);
      String invitorName = user.getFirstname() + " " + user.getLastname()
          + " [" + user.getAdresses().getEmail() + "]";
View Full Code Here


  public Long deleteAppointement(Long appointmentId) {
    log.debug("deleteAppointMent");
    try {

      Appointment app = this.getAppointmentById(appointmentId);
      app.setUpdatetime(new Date());
      app.setDeleted("true");

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

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

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

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

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

    for (Iterator<Appointment> it = aList.iterator(); it.hasNext();) {
      Appointment a = it.next();

      Element appointment = appointments.addElement("appointment");

      appointment.addElement("appointmentId").addCDATA(
          "" + a.getAppointmentId());
      appointment.addElement("appointmentName").addCDATA(
          "" + a.getAppointmentName());
      appointment.addElement("appointmentLocation").addCDATA(
          "" + a.getAppointmentLocation());
      appointment.addElement("appointmentDescription").addCDATA(
          "" + a.getAppointmentDescription());
      appointment.addElement("appointmentStarttime")
          .addCDATA(
              CalendarPatterns.getExportDate(a
                  .getAppointmentStarttime()));
      appointment.addElement("appointmentEndtime").addCDATA(
          CalendarPatterns.getExportDate(a.getAppointmentEndtime()));
      if (a.getAppointmentCategory() != null) {
        appointment.addElement("categoryId").addCDATA(
            "" + a.getAppointmentCategory().getCategoryId());
      } else {
        appointment.addElement("categoryId").addCDATA("" + 0);
      }
      if (a.getUserId() != null) {
        appointment.addElement("users_id").addCDATA(
            "" + a.getUserId().getUser_id());
      } else {
        appointment.addElement("users_id").addCDATA("" + 0);
      }
      appointment.addElement("deleted").addCDATA("" + a.getDeleted());
      if (a.getRemind() != null) {
        appointment.addElement("typId").addCDATA(
            "" + a.getRemind().getTypId());
      } else {
        appointment.addElement("typId").addCDATA("" + 0);
      }
      appointment.addElement("isDaily").addCDATA("" + a.getIsDaily());
      appointment.addElement("isWeekly").addCDATA("" + a.getIsWeekly());
      appointment.addElement("isMonthly").addCDATA("" + a.getIsMonthly());
      appointment.addElement("isYearly").addCDATA("" + a.getIsYearly());
      if (a.getRoom() != null) {
        appointment.addElement("room_id").addCDATA(
            "" + a.getRoom().getRooms_id());
      } else {
        appointment.addElement("room_id").addCDATA("" + 0);
      }
      appointment.addElement("icalId").addCDATA("" + a.getIcalId());
      appointment.addElement("language_id").addCDATA(
          "" + a.getLanguage_id());
      appointment.addElement("isPasswordProtected").addCDATA(
          "" + a.getIsPasswordProtected());
      appointment.addElement("password").addCDATA("" + a.getPassword());
    }

    return document;
  }
View Full Code Here

TOP

Related Classes of org.openmeetings.app.persistence.beans.calendar.Appointment

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.