Class AgendaEventStorage

java.lang.Object
org.exoplatform.agenda.storage.AgendaEventStorage
Direct Known Subclasses:
CachedAgendaEventStorage

public class AgendaEventStorage extends Object
  • Constructor Details

  • Method Details

    • getEventIds

      public List<Long> getEventIds(org.exoplatform.agenda.model.EventFilter eventFilter)
      Retrieves the identifiers of the events matching a filter.
      Parameters:
      eventFilter - criteria of the events to retrieve
      Returns:
      List of matching event technical identifiers
    • getPendingEventIds

      public List<Long> getPendingEventIds(Long userIdentityId, List<Long> ownerIds, List<Long> attendeeIds, List<Long> calenderIds, int offset, int limit)
    • countPendingEvents

      public long countPendingEvents(Long userIdentityId, List<Long> ownerIds, List<Long> attendeeIds, List<Long> calenderIds)
    • getUserEventCalenderIds

      public List<Long> getUserEventCalenderIds(Long userIdentityId)
    • getEventDatePollIds

      public List<Long> getEventDatePollIds(Long userIdentityId, List<Long> ownerIds, List<Long> attendeeIds, int offset, int limit)
    • getEventDatePollIds

      public List<Long> getEventDatePollIds(long userIdentityId, List<Long> ownerIds, List<Long> attendeeIds, ZonedDateTime start, ZonedDateTime end)
    • countEventDatePolls

      public long countEventDatePolls(List<Long> ownerIds, List<Long> attendeeIds)
    • getParentRecurrentEventIds

      public List<org.exoplatform.agenda.model.Event> getParentRecurrentEventIds(ZonedDateTime start, ZonedDateTime end)
    • getEventById

      public org.exoplatform.agenda.model.Event getEventById(long eventId)
    • deleteEventById

      public void deleteEventById(long eventId)
    • deleteEventAfterRead

      public void deleteEventAfterRead(long eventId)
      Deletes an event whose attendees, conferences or reminders were read in the same request, which deleteEventById(long) cannot: the persistence context is cleared before the bulk deletion of its children.
      Parameters:
      eventId - the event to delete
    • deleteCalendarEvents

      public void deleteCalendarEvents(long calendarId)
    • moveCalendarEvents

      public List<Long> moveCalendarEvents(long fromCalendarId, long toCalendarId)
      Moves all events of a calendar to another calendar, keeping every event and its associated data (attendees, reminders, conferences, recurrences, remote identifiers) untouched apart from the calendar membership.
      Parameters:
      fromCalendarId - technical identifier of the calendar the events are moved away from
      toCalendarId - technical identifier of the calendar receiving the events
      Returns:
      List of technical identifiers of the moved events, empty when the source calendar had no events
    • getExceptionalOccurenceIds

      public List<Long> getExceptionalOccurenceIds(long parentRecurrentEventId)
      Parameters:
      parentRecurrentEventId - a parent recurrent Event technical identifier
      Returns:
      List of Event identifiers corresponding to exceptional occurences events Identifiers of a parent recurrent event for a selected period of time
    • getExceptionalOccurenceIdsByPeriod

      public List<Long> getExceptionalOccurenceIdsByPeriod(long parentRecurrentEventId, ZonedDateTime start, ZonedDateTime end)
      Parameters:
      parentRecurrentEventId - a parent recurrent Event technical identifier
      start - start DateTime of period to search on
      end - end DateTime of period to search on
      Returns:
      List of Event identifiers corresponding to exceptional occurences events Identifiers of a parent recurrent event for a selected period of time
    • getExceptionalOccurenceIds

      public List<Long> getExceptionalOccurenceIds(long parentRecurrentEventId, ZonedDateTime occurrenceId)
    • createEvent

      public org.exoplatform.agenda.model.Event createEvent(org.exoplatform.agenda.model.Event event)
    • deleteExceptionalOccurencesOfSavedSeries

      public List<Long> deleteExceptionalOccurencesOfSavedSeries(long parentRecurrentEventId)
      Deletes the exceptional occurrences of a series that was just saved in this persistence context, starting from what the database holds (EventDAO.detachAll()): the rows agenda's reminder listener materialised on the save are still managed, and deleting them in place fails at the flush. The clear detaches every entity of the thread's persistence context, not only this series': a caller must not keep a managed entity across this call and rely on it afterwards, as deleteEventAfterRead(long) already requires.
      Parameters:
      parentRecurrentEventId - the series
      Returns:
      the ids of the occurrences deleted
    • deleteExceptionalOccurences

      public List<Long> deleteExceptionalOccurences(long parentRecurrentEventId)
    • getExceptionalOccurrenceEvent

      public org.exoplatform.agenda.model.Event getExceptionalOccurrenceEvent(long parentRecurrentEventId, ZonedDateTime occurrenceId)
    • updateEvent

      public org.exoplatform.agenda.model.Event updateEvent(org.exoplatform.agenda.model.Event event)
    • isRecurrentEvent

      public boolean isRecurrentEvent(long eventId)