Interface AvailabilityQuery

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

public interface AvailabilityQuery extends OsidRelationshipQuery

This is the query for searching availabilities. Each method match specifies an AND term while multiple invocations of the same method produce a nested OR .

  • Method Details

    • matchResourceId

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

      void clearResourceIdTerms()
      Clears the resource Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsResourceQuery

      boolean supportsResourceQuery()
      Tests if a ResourceQuery is available.
      Returns:
      true if a resource query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getResourceQuery

      ResourceQuery getResourceQuery()
      Gets the query for a resource. Multiple retrievals produce a nested OR term.
      Returns:
      the resource query
      Throws:
      UnimplementedException - supportsResourceQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsResourceQuery()} is {@code true} .
    • clearResourceTerms

      void clearResourceTerms()
      Clears the resource query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchJobId

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

      void clearJobIdTerms()
      Clears the job Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsJobQuery

      boolean supportsJobQuery()
      Tests if a JobQuery is available.
      Returns:
      true if a job query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getJobQuery

      JobQuery getJobQuery()
      Gets the query for a job. Multiple retrievals produce a nested OR term.
      Returns:
      the job query
      Throws:
      UnimplementedException - supportsJobQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsJobQuery()} is {@code true} .
    • clearJobTerms

      void clearJobTerms()
      Clears the job query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCompetencyId

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

      void clearCompetencyIdTerms()
      Clears the competency Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCompetencyQuery

      boolean supportsCompetencyQuery()
      Tests if a CompetencyQuery is available.
      Returns:
      true if a competency query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCompetencyQuery

      CompetencyQuery getCompetencyQuery()
      Gets the query for a competency. Multiple retrievals produce a nested OR term.
      Returns:
      the competency query
      Throws:
      UnimplementedException - supportsCompetencyQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCompetencyQuery()} is {@code true} .
    • clearCompetencyTerms

      void clearCompetencyTerms()
      Clears the competency query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchPercentage

      void matchPercentage(long low, long high, boolean match)
      Matches percentages within the given range inclusive.
      Parameters:
      low - start range
      high - end range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - low is greater than high
      Compliance:
      mandatory - This method must be implemented.
    • clearPercentageTerms

      void clearPercentageTerms()
      Clears the percentage query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchFoundryId

      void matchFoundryId(Id foundryId, boolean match)
      Sets the foundry Id for this query to match availabilities assigned to foundries.
      Parameters:
      foundryId - the foundry Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - foundryId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearFoundryIdTerms

      void clearFoundryIdTerms()
      Clears the foundry Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsFoundryQuery

      boolean supportsFoundryQuery()
      Tests if a FoundryQuery is available.
      Returns:
      true if a foundry query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getFoundryQuery

      FoundryQuery getFoundryQuery()
      Gets the query for a foundry. Multiple retrievals produce a nested OR term.
      Returns:
      the foundry query
      Throws:
      UnimplementedException - supportsFoundryQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsFoundryQuery()} is {@code true} .
    • clearFoundryTerms

      void clearFoundryTerms()
      Clears the foundry query terms.
      Compliance:
      mandatory - This method must be implemented.
    • getAvailabilityQueryRecord

      AvailabilityQueryRecord getAvailabilityQueryRecord(Type availabilityRecordType) throws OperationFailedException
      Gets the availability query record corresponding to the given Availability record Type . Multiple record retrievals produce a nested OR term.
      Parameters:
      availabilityRecordType - an availability record type
      Returns:
      the availability query record
      Throws:
      NullArgumentException - availabilityRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(availabilityRecordType) is false
      Compliance:
      mandatory - This method must be implemented.