Interface CategoryQuery

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

public interface CategoryQuery extends OsidObjectQuery

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

  • Method Details

    • matchEntryId

      void matchEntryId(Id entryId, boolean match)
      Sets the entry Id for this query to match categories that have a related entry.
      Parameters:
      entryId - an entry Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - entryId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearEntryIdTerms

      void clearEntryIdTerms()
      Clears the entry Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsEntryQuery

      boolean supportsEntryQuery()
      Tests if an EntryQuery is available.
      Returns:
      true if an entry query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getEntryQuery

      EntryQuery getEntryQuery()
      Gets the query for an entry. Multiple retrievals produce a nested OR term.
      Returns:
      the entry query
      Throws:
      UnimplementedException - supportsEntryQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsEntryQuery()} is {@code true} .
    • matchAnyEntry

      void matchAnyEntry(boolean match)
      Matches any related entry.
      Parameters:
      match - true to match categories with any entry, false to match categories with no entries
      Compliance:
      mandatory - This method must be implemented.
    • clearEntryTerms

      void clearEntryTerms()
      Clears the entry terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchBusinessId

      void matchBusinessId(Id businessId, boolean match)
      Sets the business Id for this query to match categories assigned to businesses.
      Parameters:
      businessId - the business Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - businessId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearBusinessIdTerms

      void clearBusinessIdTerms()
      Clears the business Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsBusinessQuery

      boolean supportsBusinessQuery()
      Tests if a BusinessQuery is available.
      Returns:
      true if a business query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getBusinessQuery

      BusinessQuery getBusinessQuery()
      Gets the query for a business. Multiple retrievals produce a nested OR term.
      Returns:
      the business query
      Throws:
      UnimplementedException - supportsBusinessQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsBusinessQuery()} is {@code true} .
    • clearBusinessTerms

      void clearBusinessTerms()
      Clears the business terms.
      Compliance:
      mandatory - This method must be implemented.
    • getCategoryQueryRecord

      CategoryQueryRecord getCategoryQueryRecord(Type categoryRecordType) throws OperationFailedException
      Gets the category query record corresponding to the given Category record Type .Multiple record retrievals produce a nested OR term.
      Parameters:
      categoryRecordType - a category record type
      Returns:
      the category query record
      Throws:
      NullArgumentException - categoryRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(categoryRecordType) is false
      Compliance:
      mandatory - This method must be implemented.