Interface ItemQuery

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

public interface ItemQuery extends OsidRelationshipQuery

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

  • Method Details

    • matchOrderId

      void matchOrderId(Id orderId, boolean match)
      Sets the order Id for this query to match orders assigned to items.
      Parameters:
      orderId - an order Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - orderId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearOrderIdTerms

      void clearOrderIdTerms()
      Clears the order Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsOrderQuery

      boolean supportsOrderQuery()
      Tests if an order query is available.
      Returns:
      true if an order query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getOrderQuery

      OrderQuery getOrderQuery()
      Gets the query for an item.
      Returns:
      the order query
      Throws:
      UnimplementedException - supportsOrderQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsOrderQuery()} is {@code true} .
    • clearOrderTerms

      void clearOrderTerms()
      Clears the order terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDerived

      void matchDerived(boolean match)
      Matches items that are derived.
      Parameters:
      match - true to match derived items, false to match selected items
      Compliance:
      mandatory - This method must be implemented.
    • clearDerivedTerms

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

      void matchProductId(Id productId, boolean match)
      Sets the product Id for this query.
      Parameters:
      productId - a product Id
      match - true for 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 product Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsProductQuery

      boolean supportsProductQuery()
      Tests if a product query 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.
      Returns:
      the product query
      Throws:
      UnimplementedException - supportsProductQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsProductQuery()} is {@code true} .
    • clearProductTerms

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

      void matchQuantity(long low, long high, boolean match)
      Matches quantities between the given range inclusive.
      Parameters:
      low - low range
      high - high 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.
    • clearQuantityTerms

      void clearQuantityTerms()
      Clears the quantity terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCost

      void matchCost(Currency low, Currency high, boolean match)
      Matches costs between the given range inclusive.
      Parameters:
      low - low range
      high - high 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.
    • clearCostTerms

      void clearCostTerms()
      Clears the cost terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchMinimumCost

      void matchMinimumCost(Currency cost, boolean match)
      Matches minimum costs between the given range inclusive.
      Parameters:
      cost - cost
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - cost is null
      Compliance:
      mandatory - This method must be implemented.
    • clearMinimumCostTerms

      void clearMinimumCostTerms()
      Clears the minimum cost terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchStoreId

      void matchStoreId(Id storeId, boolean match)
      Sets the item Id for this query to match orders assigned to stores.
      Parameters:
      storeId - a store Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - storeId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearStoreIdTerms

      void clearStoreIdTerms()
      Clears the store Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsStoreQuery

      boolean supportsStoreQuery()
      Tests if a StoreQuery is available.
      Returns:
      true if a store query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getStoreQuery

      StoreQuery getStoreQuery()
      Gets the query for a store query. Multiple retrievals produce a nested OR term.
      Returns:
      the store query
      Throws:
      UnimplementedException - supportsStoreQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsStoreQuery()} is {@code true} .
    • clearStoreTerms

      void clearStoreTerms()
      Clears the store terms.
      Compliance:
      mandatory - This method must be implemented.
    • getItemQueryRecord

      ItemQueryRecord getItemQueryRecord(Type itemRecordType) throws OperationFailedException
      Gets the item query record corresponding to the given Item record Type .Multiple record retrievals produce a nested boolean 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.