Class CalendarDaoImpl
java.lang.Object
ch.tocco.nice2.optional.calendar.impl.ical.CalendarDaoImpl
- All Implemented Interfaces:
CalendarDao
-
Constructor Summary
ConstructorDescriptionCalendarDaoImpl
(org.slf4j.Logger log, Context context, QueryBuilderFactory queryBuilderFactory, CalendarEventFactory calendarEventFactory, CreatedEntitiesPool createdEntities, CalendarManagerListenerService listenerService, CalendarEventContributionService contributionService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAndLinkCalendarEvent
(CalendarEvent event, String relationName, Entity target) Saves the specified calendar event to db and links the target entity to the calendar event.findCalendars
(EntityFilter calendarEntityFilter, EntityFilter calendarEventEntityFilter, @Nullable Context context) @Nullable Entity
internalLoadCalendarByEventId
(UUID id, @Nullable Context ctx) Loads a 'shallow' calendar event specified by the id.loadEventEntity
(UUID id, @Nullable Context context) mapCalendar
(Entity calEntity, EntityFilter calendarEventEntityFilter) Creates aCalendar
object from the specified entity.mapCalendarEvent
(Entity calendarEventEntity, EntityFilter calendarEventEntityFilter) resolveRelation
(CalendarEvent event, @Nullable Context ctx) resolveRelation
(CalendarEvent event, String relationName, @Nullable Context ctx) void
saveCalendar
(Calendar cal, @Nullable Context context) void
saveEvent
(CalendarEvent calendarEvent, @Nullable Context ctx) void
saveEventAndCalendarRelation
(CalendarEvent calendarEvent)
-
Constructor Details
-
CalendarDaoImpl
public CalendarDaoImpl(org.slf4j.Logger log, Context context, QueryBuilderFactory queryBuilderFactory, CalendarEventFactory calendarEventFactory, CreatedEntitiesPool createdEntities, CalendarManagerListenerService listenerService, CalendarEventContributionService contributionService)
-
-
Method Details
-
findCalendars
public List<Calendar> findCalendars(EntityFilter calendarEntityFilter, EntityFilter calendarEventEntityFilter, @Nullable @Nullable Context context) - Specified by:
findCalendars
in interfaceCalendarDao
-
mapCalendar
Description copied from interface:CalendarDao
Creates aCalendar
object from the specified entity. If target is not null, only events that are linked to this entity are returned.- Specified by:
mapCalendar
in interfaceCalendarDao
-
mapCalendarEvent
public CalendarEvent mapCalendarEvent(Entity calendarEventEntity, EntityFilter calendarEventEntityFilter) - Specified by:
mapCalendarEvent
in interfaceCalendarDao
-
saveCalendar
- Specified by:
saveCalendar
in interfaceCalendarDao
-
loadEvent
Description copied from interface:CalendarDao
Loads a 'shallow' calendar event specified by the id. Shallow means, it has no calendar attached.- Specified by:
loadEvent
in interfaceCalendarDao
-
loadEventEntity
- Specified by:
loadEventEntity
in interfaceCalendarDao
-
internalLoadCalendarByEventId
-
resolveRelation
public Relation resolveRelation(CalendarEvent event, String relationName, @Nullable @Nullable Context ctx) - Specified by:
resolveRelation
in interfaceCalendarDao
-
resolveRelation
- Specified by:
resolveRelation
in interfaceCalendarDao
-
addAndLinkCalendarEvent
Description copied from interface:CalendarDao
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).- Specified by:
addAndLinkCalendarEvent
in interfaceCalendarDao
- Parameters:
event
- a new eventtarget
- a target entity that is linked to the event
-
saveEvent
- Specified by:
saveEvent
in interfaceCalendarDao
-
saveEventAndCalendarRelation
- Specified by:
saveEventAndCalendarRelation
in interfaceCalendarDao
-