Class CalendarImpl

java.lang.Object
ch.tocco.nice2.optional.calendar.impl.ical.CalendarImpl
All Implemented Interfaces:
Calendar

public class CalendarImpl extends Object implements Calendar
  • Constructor Details

    • CalendarImpl

      public CalendarImpl(@Nullable @Nullable Long id, String uniqueId, String entityType, String relationName, @Nullable @Nullable org.joda.time.DateTimeZone timeZone)
  • Method Details

    • getTimeZone

      public org.joda.time.DateTimeZone getTimeZone()
      Description copied from interface: Calendar
      Returns the standard time zone used by this calender. If no timezone has been explicitely set, UTC is returned.
      Specified by:
      getTimeZone in interface Calendar
    • setTimeZone

      public void setTimeZone(@Nullable @Nullable org.joda.time.DateTimeZone timeZone)
      Description copied from interface: Calendar
      Sets the default time zone for this calendar. A null value will set the time zone to UTC.
      Specified by:
      setTimeZone in interface Calendar
    • getEntityType

      public String getEntityType()
      Description copied from interface: Calendar
      The entity model that this calendar is associated to.
      Specified by:
      getEntityType in interface Calendar
    • getRelationName

      public String getRelationName()
      Description copied from interface: Calendar
      The name of the relation that links arbitary entities to Calendar_events of this calendar. It is the name from Calendar_event to another entity, for example:
      
         Calendar_event ---relationName--> Room
       
      Specified by:
      getRelationName in interface Calendar
    • setRelationName

      public void setRelationName(String relationName)
    • setId

      public void setId(Long id)
    • setEntityType

      public void setEntityType(String entityType)
    • getId

      @Nullable public @Nullable Long getId()
      Specified by:
      getId in interface Calendar
    • getUniqueId

      public String getUniqueId()
      Description copied from interface: Calendar
      Returns the name of this calendar.
      Specified by:
      getUniqueId in interface Calendar
    • setUniqueId

      public void setUniqueId(String uniqueId)
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface Calendar
    • setDescription

      public void setDescription(String descr)
      Specified by:
      setDescription in interface Calendar
    • getEvents

      public List<CalendarEvent> getEvents(DateTimeValue date)
      Description copied from interface: Calendar

      Returns a list of CalendarEvents that occur on the specified day. The calendar is searched for events from the start until the end of the day specified by the argument.

      Recurring events are resolved to its recurrence set.

      Specified by:
      getEvents in interface Calendar
    • getEvents

      public List<CalendarEvent> getEvents(DateTimeValue start, DateTimeValue end)
      Description copied from interface: Calendar

      Returns a list of CalendarEvents of this calendar within the specified period (inclusive). This will resolve recurring events to its recurrence set.

      If both, start and end date, are of type date and denote the same point in time, this method returns the same result as Calendar.getEvents(DateTimeValue).

      Specified by:
      getEvents in interface Calendar
    • getEvents

      public List<CalendarEvent> getEvents()
      Description copied from interface: Calendar
      Returns all events from this calendar. This will not resolve recurring events to its recurrence set.
      Specified by:
      getEvents in interface Calendar
    • getCalendarEvent

      public CalendarEvent getCalendarEvent(UUID id)
      Description copied from interface: Calendar
      Returns an event with the specified id.
      Specified by:
      getCalendarEvent in interface Calendar
    • addEvent

      public void addEvent(CalendarEvent event)
      Specified by:
      addEvent in interface Calendar
    • getICal

      public net.fortuna.ical4j.model.Calendar getICal()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object