Interface CalendarDao
- All Known Implementing Classes:
CalendarDaoImpl
public interface CalendarDao
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAndLinkCalendarEvent
(CalendarEvent event, Entity target) Saves the specified calendar event to db and links the target entity to the calendar event.void
addAndLinkCalendarEvent
(CalendarEvent event, String relationName, Entity target) void
deleteEvent
(UUID id, @Nullable Context context) int
deleteEvents
(EntityFilter eventFilter, @Nullable Context context) Delets all events that are returned by the query created from the specified event.@Nullable Calendar
findCalendar
(UUID eventId, EntityFilter calendarEventEntityFilter, @Nullable Context context) Returns the calendar that the specified event belongs to, or null if nothing is found.findCalendars
(EntityFilter calendarEntityFilter, EntityFilter calendarEventEntityFilter, @Nullable Context context) void
linkEntity
(CalendarEvent event, Entity target) Links the specified entity to the calendar event.void
linkEntity
(CalendarEvent event, String relationName, Entity target) loadCalendar
(long id, EntityFilter calendarEventEntityFilter, @Nullable Context context) @Nullable CalendarEvent
loadEvent
(UUID id, EntityFilter calendarEventEntityFilter, @Nullable Context context) Loads the calendar event with its calendar attached.@Nullable CalendarEvent
Loads a 'shallow' calendar event specified by the id.@Nullable Entity
loadEventEntity
(UUID id, @Nullable Context context) mapCalendar
(Entity calEntity, EntityFilter calendarEventEntityFilter) Creates aCalendar
object from the specified entity.mapCalendarEvent
(Entity calendarEventEntity) mapCalendarEvent
(Entity calendarEventEntity, EntityFilter calendarEventEntityFilter) resolveRelation
(CalendarEvent event, @Nullable Context context) resolveRelation
(CalendarEvent event, String relationName, @Nullable Context context) void
saveCalendar
(Calendar cal, @Nullable Context context) void
saveEvent
(CalendarEvent calendarEvent, @Nullable Context context) void
saveEventAndCalendarRelation
(CalendarEvent calendarEvent)
-
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
Loads a 'shallow' calendar event specified by the id. Shallow means, it has no calendar attached. -
loadEventEntity
-
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
-
deleteEvents
Delets all events that are returned by the query created from the specified event.- Returns:
- the number of events deleted
-
saveCalendar
-
resolveRelation
-
resolveRelation
Relation resolveRelation(CalendarEvent event, String relationName, @Nullable @Nullable Context context) -
linkEntity
Links the specified entity to the calendar event. The calendar event must be attached to a calendar and saved in the db. -
linkEntity
-
mapCalendar
Creates aCalendar
object from the specified entity. If target is not null, only events that are linked to this entity are returned. -
mapCalendarEvent
-
mapCalendarEvent
-
addAndLinkCalendarEvent
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 (callCalendar.addEvent(CalendarEvent)
for this).- Parameters:
event
- a new eventtarget
- a target entity that is linked to the event
-
addAndLinkCalendarEvent
-
saveEvent
-
saveEventAndCalendarRelation
-