Interface ItemQuery

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

public interface ItemQuery extends OsidObjectQuery

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

  • Method Details

    • matchCategoryId

      void matchCategoryId(Id categoryId, boolean match)
      Sets the category Id for this query.
      Parameters:
      categoryId - a category Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - categoryId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCategoryIdTerms

      void clearCategoryIdTerms()
      Clears the category Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCategoryQuery

      boolean supportsCategoryQuery()
      Tests if a CategoryQuery is available.
      Returns:
      true if a category query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCategoryQuery

      CategoryQuery getCategoryQuery()
      Gets the query for a category. Multiple retrievals produce a nested OR term.
      Returns:
      a category query
      Throws:
      UnimplementedException - supportsCategoryQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportscategoryQuery()} is {@code true} .
    • clearCategoryTerms

      void clearCategoryTerms()
      Clears the category terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAccountId

      void matchAccountId(Id accountId, boolean match)
      Sets the account Id for this query to match items that have a related financial account.
      Parameters:
      accountId - an account Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - accountId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearAccountIdTerms

      void clearAccountIdTerms()
      Clears the account Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAccountQuery

      boolean supportsAccountQuery()
      Tests if an AccountQuery is available.
      Returns:
      true if an account query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAccountQuery

      AccountQuery getAccountQuery()
      Gets the query for an account. Multiple retrievals produce a nested OR term.
      Returns:
      the account query
      Throws:
      UnimplementedException - supportsAccountQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAccountQuery()} is {@code true} .
    • matchAnyAccount

      void matchAnyAccount(boolean match)
      Matches items that have any account.
      Parameters:
      match - true to match items with any account, false to match items with no account
      Compliance:
      mandatory - This method must be implemented.
    • clearAccountTerms

      void clearAccountTerms()
      Clears the account terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchProductId

      void matchProductId(Id productId, boolean match)
      Sets the product Id for this query to match items that have a related product.
      Parameters:
      productId - a product Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - productId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearProductIdTerms

      void clearProductIdTerms()
      Clears the account Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsProductQuery

      boolean supportsProductQuery()
      Tests if a ProductQuery is available.
      Returns:
      true if a product query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getProductQuery

      ProductQuery getProductQuery()
      Gets the query for a product. Multiple retrievals produce a nested OR term.
      Returns:
      the product query
      Throws:
      UnimplementedException - supportsProductQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsProductQuery()} is {@code true} .
    • matchAnyProduct

      void matchAnyProduct(boolean match)
      Matches items that have any product.
      Parameters:
      match - true to match items with any product, false to match items with no product
      Compliance:
      mandatory - This method must be implemented.
    • clearProductTerms

      void clearProductTerms()
      Clears the product terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAmount

      void matchAmount(Currency low, Currency high, boolean match)
      Matches the amount between the given range inclusive.
      Parameters:
      low - start of range
      high - end of range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - low is greater than high
      NullArgumentException - low or high is null
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyAmount

      void matchAnyAmount(boolean match)
      Matches items that have any amount set.
      Parameters:
      match - true to match items with any amount, false to match items with no amount
      Compliance:
      mandatory - This method must be implemented.
    • clearAmountTerms

      void clearAmountTerms()
      Clears the amount terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDebit

      void matchDebit(boolean match)
      Matches items that have debit amounts.
      Parameters:
      match - true to match items with a debit amount, false to match items with a credit amount
      Compliance:
      mandatory - This method must be implemented.
    • clearDebitTerms

      void clearDebitTerms()
      Clears the debit terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchRecurringInterval

      void matchRecurringInterval(Duration low, Duration high, boolean match)
      Matches the recurring interval between the given range inclusive.
      Parameters:
      low - start of range
      high - end of range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - low is greater than high
      NullArgumentException - low or high is null
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyRecurringInterval

      void matchAnyRecurringInterval(boolean match)
      Matches items that have any recurring interval.
      Parameters:
      match - true to match items with any recurring interval, false to match items with a one-time charge
      Compliance:
      mandatory - This method must be implemented.
    • clearRecurringIntervalTerms

      void clearRecurringIntervalTerms()
      Clears the amount terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchEntryId

      void matchEntryId(Id entryId, boolean match)
      Sets the entry Id for this query to match items 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 items that have any entry.
      Parameters:
      match - true to match items with any entry. false to match items with no entry
      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 customers 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.
    • getItemQueryRecord

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