Interface OfferingQuery

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

public interface OfferingQuery extends OsidRelationshipQuery

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

  • Method Details

    • matchCanonicalUnitId

      void matchCanonicalUnitId(Id canonicalUnitId, boolean match)
      Sets the canonical unit Id for this query.
      Parameters:
      canonicalUnitId - a canonica unitl Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - canonicalUnitId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCanonicalUnitIdTerms

      void clearCanonicalUnitIdTerms()
      Clears the canonical unit Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCanonicalUnitQuery

      boolean supportsCanonicalUnitQuery()
      Tests if a CanonicalUnitQuery is available.
      Returns:
      true if a canonical unit query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCanonicalUnitQuery

      CanonicalUnitQuery getCanonicalUnitQuery()
      Gets the query for a canonical unit. Multiple retrievals produce a nested OR term.
      Returns:
      the canonical unit query
      Throws:
      UnimplementedException - supportsCanonicalUnitQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCanonicalUnitQuery()} is {@code true} .
    • clearCanonicalUnitTerms

      void clearCanonicalUnitTerms()
      Clears the canonical unit terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchTimePeriodId

      void matchTimePeriodId(Id timePeriodId, boolean match)
      Sets the time period Id for this query to match offerings that have a related term.
      Parameters:
      timePeriodId - a time period Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - timePeriodId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearTimePeriodIdTerms

      void clearTimePeriodIdTerms()
      Clears the time period Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsTimePeriodQuery

      boolean supportsTimePeriodQuery()
      Tests if a TimePeriodQuery is available.
      Returns:
      true if a time period query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getTimePeriodQuery

      TimePeriodQuery getTimePeriodQuery()
      Gets the query for a time period. Multiple retrievals produce a nested OR term.
      Returns:
      the time period query
      Throws:
      UnimplementedException - supportsTimePeriodQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsTimePeriodQuery()} is {@code true} .
    • clearTimePeriodTerms

      void clearTimePeriodTerms()
      Clears the time period terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchTitle

      void matchTitle(String title, Type stringMatchType, boolean match)
      Matches a title.
      Parameters:
      title - a title
      stringMatchType - a string match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - title is not of stringMatchType
      NullArgumentException - title or stringMatchType is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyTitle

      void matchAnyTitle(boolean match)
      Matches offerings with any title.
      Parameters:
      match - true to match offerings with any title, false to match offerings with no title
      Compliance:
      mandatory - This method must be implemented.
    • clearTitleTerms

      void clearTitleTerms()
      Clears all title terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCode

      void matchCode(String code, Type stringMatchType, boolean match)
      Matches a code.
      Parameters:
      code - a code
      stringMatchType - a string match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - code is not of stringMatchType
      NullArgumentException - code or stringMatchType is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyCode

      void matchAnyCode(boolean match)
      Matches offerings with any code.
      Parameters:
      match - true to match offerings with any code, false to match offerings with no code
      Compliance:
      mandatory - This method must be implemented.
    • clearCodeTerms

      void clearCodeTerms()
      Clears all code terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchResultOptionId

      void matchResultOptionId(Id gradeSystemId, boolean match)
      Sets the grade system Id for this query.
      Parameters:
      gradeSystemId - a grade system Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - gradeSystemId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearResultOptionIdTerms

      void clearResultOptionIdTerms()
      Clears the grade system Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsResultOptionQuery

      boolean supportsResultOptionQuery()
      Tests if a GradeSystemQuery is available.
      Returns:
      true if a grade system query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getResultOptionQuery

      GradeSystemQuery getResultOptionQuery()
      Gets the query for a grading option. Multiple retrievals produce a nested OR term.
      Returns:
      a grade system query
      Throws:
      UnimplementedException - supportsResultOptionQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsGradingOptionQuery()} is {@code true} .
    • matchAnyResultOption

      void matchAnyResultOption(boolean match)
      Matches offerings that have any grading option.
      Parameters:
      match - true to match offerings with any grading option, false to match offerings with no grading options
      Compliance:
      mandatory - This method must be implemented.
    • clearResultOptionTerms

      void clearResultOptionTerms()
      Clears the grading option terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchSponsorId

      void matchSponsorId(Id resourceId, boolean match)
      Sets the resource Id for this query to match offerings that have a sponsor.
      Parameters:
      resourceId - a resource Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - resourceId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearSponsorIdTerms

      void clearSponsorIdTerms()
      Clears the sponsor Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsSponsorQuery

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

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

      void matchAnySponsor(boolean match)
      Matches offerings that have any sponsor.
      Parameters:
      match - true to match offerings with any sponsor, false to match offerings with no sponsors
      Compliance:
      mandatory - This method must be implemented.
    • clearSponsorTerms

      void clearSponsorTerms()
      Clears the sponsor terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCatalogueId

      void matchCatalogueId(Id catalogueId, boolean match)
      Sets the catalogue Id for this query to match offerings assigned to catalogues.
      Parameters:
      catalogueId - a catalogue Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - catalogueId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCatalogueIdTerms

      void clearCatalogueIdTerms()
      Clears all catalogue Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCatalogueQuery

      boolean supportsCatalogueQuery()
      Tests if a CatalogueQuery is available.
      Returns:
      true if a catalogue query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCatalogueQuery

      CatalogueQuery getCatalogueQuery()
      Gets the query for a catalogue query. Multiple retrievals produce a nested OR term.
      Returns:
      the catalogue query
      Throws:
      UnimplementedException - supportsCatalogueQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCatalogueQuery()} is {@code true} .
    • clearCatalogueTerms

      void clearCatalogueTerms()
      Clears all catalogue terms.
      Compliance:
      mandatory - This method must be implemented.
    • getOfferingQueryRecord

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