Class AppointmentDao

java.lang.Object
org.apache.openmeetings.db.dao.calendar.AppointmentDao
All Implemented Interfaces:
IDataProviderDao<Appointment>

@Repository @Transactional public class AppointmentDao extends Object implements IDataProviderDao<Appointment>
  • Constructor Details

    • AppointmentDao

      public AppointmentDao()
  • Method Details

    • get

      public Appointment get(Long id)
      Description copied from interface: IDataProviderDao
      Get an instance of an IDataProviderDao
      Specified by:
      get in interface IDataProviderDao<Appointment>
      Parameters:
      id - - id of instance to retrieve
      Returns:
      instance with the id gived
    • getAny

      public Appointment getAny(Long id)
    • get

      public List<Appointment> get()
    • update

      public Appointment update(Appointment a, Long userId)
      Description copied from interface: IDataProviderDao
      Update an instance of IDataProviderDao
      Specified by:
      update in interface IDataProviderDao<Appointment>
      Parameters:
      a - - entity to be updated
      userId - - user performed update
      Returns:
      - updated entity
    • update

      public Appointment update(Appointment a, Long userId, boolean sendmails)
    • delete

      public void delete(Appointment a, Long userId)
      Description copied from interface: IDataProviderDao
      Delete an instance of IDataProviderDao
      Specified by:
      delete in interface IDataProviderDao<Appointment>
      Parameters:
      a - - entity to be deleted
      userId - - user performed delete
    • getInRange

      public List<Appointment> getInRange(Long userId, Date start, Date end)
    • getInRange

      public List<Appointment> getInRange(Calendar start, Calendar end)
    • getNext

      public Appointment getNext(Long userId, Date start)
    • searchByTitle

      public List<Appointment> searchByTitle(Long userId, String title)
    • getByRoom

      public Appointment getByRoom(Long userId, Long roomId)
    • getByRoom

      public Appointment getByRoom(Long roomId)
    • getHrefsbyCalendar

      public List<String> getHrefsbyCalendar(Long calId)
      Returns the Appointment HREF's belonging to the Calendar Id specified.
      Parameters:
      calId - Calendar to which the Appointments are related to.
      Returns:
      List of Appointment HREF's
    • getbyCalendar

      public List<Appointment> getbyCalendar(Long calId)
      Returns the Appointments related to the Calendar ID specified.
      Parameters:
      calId - Calendar ID of the calendar, to which the appointment is associated
      Returns:
      List of Appointment
    • deletebyCalendar

      public int deletebyCalendar(Long calId)
      Bulk Deletes the Appointments related the the calId. Note: Does not automatically, commit, but gets cascaded in the function which calls it. If there is a need to commit during this function, use em.flush() and em.clear()
      Parameters:
      calId - Calendar Id of the Calendar Id to which the Appointments belong to.
      Returns:
      Returns -1 if the there was an error executing the query, otherwise returns the number of updated rows. as described here Query.executeUpdate()
    • get

      public List<Appointment> get(long start, long count)
      Description copied from interface: IDataProviderDao
      Get a list of instances of IDataProviderDao
      Specified by:
      get in interface IDataProviderDao<Appointment>
      Parameters:
      start - - the start to range to retrieve
      count - - maximum instance count to retrieve
      Returns:
      list of instances in the range specified
    • get

      public List<Appointment> get(String search, long start, long count, org.apache.wicket.extensions.markup.html.repeater.util.SortParam<String> order)
      Description copied from interface: IDataProviderDao
      Get a list of instances of IDataProviderDao
      Specified by:
      get in interface IDataProviderDao<Appointment>
      Parameters:
      search - - string search criteria to filter entities
      start - - the start to range to retrieve
      count - - maximum instance count to retrieve
      order - - column and sort order
      Returns:
      list of instances in the range specified
    • count

      public long count()
      Description copied from interface: IDataProviderDao
      Count the number of instances of IDataProviderDao
      Specified by:
      count in interface IDataProviderDao<Appointment>
      Returns:
      count of instances
    • count

      public long count(String search)
      Description copied from interface: IDataProviderDao
      Count the number of instances of IDataProviderDao
      Specified by:
      count in interface IDataProviderDao<Appointment>
      Parameters:
      search - - string search criteria to filter entities
      Returns:
      count of instances satisfying given search criteria