Interface CalendarDao

All Known Implementing Classes:
CalendarDaoImpl

public interface CalendarDao
  • Method Details

    • loadCalendar

      Calendar loadCalendar(long id, EntityFilter calendarEventEntityFilter, @Nullable @Nullable Context context) throws CalendarDataAccessException
      Throws:
      CalendarDataAccessException
    • findCalendars

      List<Calendar> findCalendars(EntityFilter calendarEntityFilter, EntityFilter calendarEventEntityFilter, @Nullable @Nullable Context context)
    • findCalendar

      @Nullable @Nullable Calendar findCalendar(UUID eventId, EntityFilter calendarEventEntityFilter, @Nullable @Nullable Context context)
      Returns the calendar that the specified event belongs to, or null if nothing is found.
    • loadEvent

      @Nullable @Nullable CalendarEvent loadEvent(UUID id, @Nullable @Nullable Context context)
      Loads a 'shallow' calendar event specified by the id. Shallow means, it has no calendar attached.
    • loadEventEntity

      @Nullable @Nullable Entity loadEventEntity(UUID id, @Nullable @Nullable Context context)
    • loadEvent

      @Nullable @Nullable CalendarEvent loadEvent(UUID id, EntityFilter calendarEventEntityFilter, @Nullable @Nullable Context context)
      Loads the calendar event with its calendar attached. The other calendar events that are loaded can be narrowed by the specified calendarEventEntityFilter.
    • deleteEvent

      void deleteEvent(UUID id, @Nullable @Nullable Context context)
    • deleteEvents

      int deleteEvents(EntityFilter eventFilter, @Nullable @Nullable Context context)
      Delets all events that are returned by the query created from the specified event.
      Returns:
      the number of events deleted
    • saveCalendar

      void saveCalendar(Calendar cal, @Nullable @Nullable Context context)
    • resolveRelation

      Relation resolveRelation(CalendarEvent event, @Nullable @Nullable Context context)
    • resolveRelation

      Relation resolveRelation(CalendarEvent event, String relationName, @Nullable @Nullable Context context)
    • linkEntity

      void linkEntity(CalendarEvent event, Entity target)
      Links the specified entity to the calendar event. The calendar event must be attached to a calendar and saved in the db.
    • linkEntity

      void linkEntity(CalendarEvent event, String relationName, Entity target)
    • mapCalendar

      Calendar mapCalendar(Entity calEntity, EntityFilter calendarEventEntityFilter)
      Creates a Calendar object from the specified entity. If target is not null, only events that are linked to this entity are returned.
    • mapCalendarEvent

      CalendarEvent mapCalendarEvent(Entity calendarEventEntity, EntityFilter calendarEventEntityFilter)
    • mapCalendarEvent

      CalendarEvent mapCalendarEvent(Entity calendarEventEntity)
    • addAndLinkCalendarEvent

      void addAndLinkCalendarEvent(CalendarEvent event, Entity target)
      Saves the specified calendar event to db and links the target entity to the calendar event. The calendar event must be attached to a calendar (call Calendar.addEvent(CalendarEvent) for this).
      Parameters:
      event - a new event
      target - a target entity that is linked to the event
    • addAndLinkCalendarEvent

      void addAndLinkCalendarEvent(CalendarEvent event, String relationName, Entity target)
    • saveEvent

      void saveEvent(CalendarEvent calendarEvent, @Nullable @Nullable Context context)
    • saveEventAndCalendarRelation

      void saveEventAndCalendarRelation(CalendarEvent calendarEvent)