Class CalendarEntityServiceImpl

java.lang.Object
ch.tocco.nice2.optional.calendar.impl.CalendarEntityServiceImpl
All Implemented Interfaces:
CalendarEntityService

@Component public class CalendarEntityServiceImpl extends Object implements CalendarEntityService
  • Constructor Details

  • Method Details

    • getSystemCalendar

      public Entity getSystemCalendar(String entityName)
      Description copied from interface: CalendarEntityService
      loads the system calendar for a given entity model do not use this for entity models that use one calendar for each entity
      Specified by:
      getSystemCalendar in interface CalendarEntityService
      Parameters:
      entityName - the entity model to load the calendar for
      Returns:
      an optional containing the system calendar if it exists, empty otherwise
    • getOrCreateEntityCalendar

      public Entity getOrCreateEntityCalendar(Entity sourceEntity, String entityName, String calendarTypeId)
      Description copied from interface: CalendarEntityService
      use to handle Calendar entities that are related to one specific source entity either loads an existing Calendar or creates a new one
      Specified by:
      getOrCreateEntityCalendar in interface CalendarEntityService
      Parameters:
      sourceEntity - the source entity to get the Calendar for
      entityName - the entity name for which to get the contribution
      calendarTypeId - the Calendar_type unique_id for which to get the contribution
      Returns:
      the Calendar for the source entity