Class CalendarDaoImpl
java.lang.Object
ch.tocco.nice2.optional.calendar.impl.ical.CalendarDaoImpl
- All Implemented Interfaces:
CalendarDao
-
Constructor Summary
ConstructorsConstructorDescriptionCalendarDaoImpl(org.slf4j.Logger log, Context context, QueryBuilderFactory queryBuilderFactory, CalendarEventFactory calendarEventFactory, CreatedEntitiesPool createdEntities, CalendarManagerListenerService listenerService, CalendarEventContributionService contributionService) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAndLinkCalendarEvent(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 EntityinternalLoadCalendarByEventId(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 aCalendarobject from the specified entity.mapCalendarEvent(Entity calendarEventEntity, EntityFilter calendarEventEntityFilter) resolveRelation(CalendarEvent event, @Nullable Context ctx) resolveRelation(CalendarEvent event, String relationName, @Nullable Context ctx) voidsaveCalendar(Calendar cal, @Nullable Context context) voidsaveEvent(CalendarEvent calendarEvent, @Nullable Context ctx) voidsaveEventAndCalendarRelation(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:
findCalendarsin interfaceCalendarDao
-
mapCalendar
Description copied from interface:CalendarDaoCreates aCalendarobject from the specified entity. If target is not null, only events that are linked to this entity are returned.- Specified by:
mapCalendarin interfaceCalendarDao
-
mapCalendarEvent
public CalendarEvent mapCalendarEvent(Entity calendarEventEntity, EntityFilter calendarEventEntityFilter) - Specified by:
mapCalendarEventin interfaceCalendarDao
-
saveCalendar
- Specified by:
saveCalendarin interfaceCalendarDao
-
loadEvent
Description copied from interface:CalendarDaoLoads a 'shallow' calendar event specified by the id. Shallow means, it has no calendar attached.- Specified by:
loadEventin interfaceCalendarDao
-
loadEventEntity
- Specified by:
loadEventEntityin interfaceCalendarDao
-
internalLoadCalendarByEventId
-
resolveRelation
public Relation resolveRelation(CalendarEvent event, String relationName, @Nullable @Nullable Context ctx) - Specified by:
resolveRelationin interfaceCalendarDao
-
resolveRelation
- Specified by:
resolveRelationin interfaceCalendarDao
-
addAndLinkCalendarEvent
Description copied from interface:CalendarDaoSaves 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:
addAndLinkCalendarEventin interfaceCalendarDao- Parameters:
event- a new eventtarget- a target entity that is linked to the event
-
saveEvent
- Specified by:
saveEventin interfaceCalendarDao
-
saveEventAndCalendarRelation
- Specified by:
saveEventAndCalendarRelationin interfaceCalendarDao
-