Interface TimePeriodQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidExtensibleQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, Suppliable

public interface TimePeriodQuery extends OsidObjectQuery

This is the query for searching time periods. Each method match request produces an AND term while multiple invocations of a method produces a nested OR .

  • Method Details

    • matchStart

      void matchStart(DateTime low, DateTime high, boolean match)
      Matches the time period start time between the given range inclusive.
      Parameters:
      low - low time range
      high - high time range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - high is less than low
      NullArgumentException - high or low is zero
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyStart

      void matchAnyStart(boolean match)
      Matches a time period that has any start time assigned.
      Parameters:
      match - true to match time periods with any start time, false to match time periods with no start time
      Compliance:
      mandatory - This method must be implemented.
    • clearStartTerms

      void clearStartTerms()
      Clears the time period start terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchEnd

      void matchEnd(DateTime low, DateTime high, boolean match)
      Matches the time period end time between the given range inclusive.
      Parameters:
      low - low time range
      high - high time range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - high is less than low
      NullArgumentException - high or low is zero
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyEnd

      void matchAnyEnd(boolean match)
      Matches a time period that has any end time assigned.
      Parameters:
      match - true to match time periods with any end time, false to match time periods with no end time
      Compliance:
      mandatory - This method must be implemented.
    • clearEndTerms

      void clearEndTerms()
      Clears the time period end terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchTime

      void matchTime(DateTime time, boolean match)
      Matches time periods that include the given time.
      Parameters:
      time - date
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyTime

      void matchAnyTime(boolean match)
      Matches a time period that has any time assigned.
      Parameters:
      match - true to match time periods with any time, false to match time periods with no time
      Compliance:
      mandatory - This method must be implemented.
    • clearTimeTerms

      void clearTimeTerms()
      Clears the time terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchTimeInclusive

      void matchTimeInclusive(DateTime start, DateTime end, boolean match)
      Matches time periods with start and end times between the given range inclusive.
      Parameters:
      start - start date
      end - end date
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - end is less than start
      NullArgumentException - start or end is zero
      Compliance:
      mandatory - This method must be implemented.
    • clearTimeInclusiveTerms

      void clearTimeInclusiveTerms()
      Clears the time inclusive terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDuration

      void matchDuration(Duration low, Duration high, boolean match)
      Matches the time period duration between the given range inclusive.
      Parameters:
      low - low duration range
      high - high duration range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - high is less than low
      NullArgumentException - high or low is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDurationTerms

      void clearDurationTerms()
      Clears the duration terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchExceptionId

      void matchExceptionId(Id eventId, boolean match)
      Sets the event Id for this query to match exceptions.
      Parameters:
      eventId - an exception event Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - eventId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearExceptionIdTerms

      void clearExceptionIdTerms()
      Clears the exception event Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsExceptionQuery

      boolean supportsExceptionQuery()
      Tests if an EventQuery is available for querying exception events.
      Returns:
      true if an exception query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getExceptionQuery

      EventQuery getExceptionQuery()
      Gets the query for an exception event. Multiple retrievals produce a nested OR term.
      Returns:
      the event query
      Throws:
      UnimplementedException - supportsExceptionQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsExceptionQuery()} is {@code true} .
    • matchAnyException

      void matchAnyException(boolean match)
      Matches a time period that has any exception event assigned.
      Parameters:
      match - true to match time periods with any exception, false to match time periods with no exception
      Compliance:
      mandatory - This method must be implemented.
    • clearExceptionTerms

      void clearExceptionTerms()
      Clears the exception event terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchEventId

      void matchEventId(Id eventId, boolean match)
      Sets the event Id for this query.
      Parameters:
      eventId - an event or recurring event Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - eventId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearEventIdTerms

      void clearEventIdTerms()
      Clears the event Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsEventQuery

      boolean supportsEventQuery()
      Tests if an EventQuery is available for querying events.
      Returns:
      true if an event query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getEventQuery

      EventQuery getEventQuery()
      Gets the query for an event or recurring event. Multiple retrievals produce a nested OR term.
      Returns:
      the event query
      Throws:
      UnimplementedException - supportsEventQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsEventQuery()} is {@code true} .
    • matchAnyEvent

      void matchAnyEvent(boolean match)
      Matches a time period that has any event assigned.
      Parameters:
      match - true to match time periods with any event, false to match time periods with no events
      Compliance:
      mandatory - This method must be implemented.
    • clearEventTerms

      void clearEventTerms()
      Clears the event terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCalendarId

      void matchCalendarId(Id calendarId, boolean match)
      Sets the calendar Id for this query.
      Parameters:
      calendarId - a calendar Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - calendarId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCalendarIdTerms

      void clearCalendarIdTerms()
      Clears the calendar Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCalendarQuery

      boolean supportsCalendarQuery()
      Tests if a CalendarQuery is available for querying resources.
      Returns:
      true if a calendar query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCalendarQuery

      CalendarQuery getCalendarQuery()
      Gets the query for a calendar. Multiple retrievals produce a nested OR term.
      Returns:
      the calendar query
      Throws:
      UnimplementedException - supportsCalendarQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCalendarQuery()} is {@code true} .
    • clearCalendarTerms

      void clearCalendarTerms()
      Clears the calendar terms.
      Compliance:
      mandatory - This method must be implemented.
    • getTimePeriodQueryRecord

      TimePeriodQueryRecord getTimePeriodQueryRecord(Type timePeriodRecordType) throws OperationFailedException
      Gets the time period query record corresponding to the given TimePeriod record Type . Multiple retrievals produce a nested OR term.
      Parameters:
      timePeriodRecordType - a time period query record type
      Returns:
      the time period query record
      Throws:
      NullArgumentException - timePeriodRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(timePeriodRecordType) is false
      Compliance:
      mandatory - This method must be implemented.