Interface ProductQuery

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

public interface ProductQuery extends OsidObjectQuery

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

  • Method Details

    • matchCode

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

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

      void clearCodeTerms()
      Clears the code.
      Compliance:
      mandatory - This method must be implemented.
    • matchPriceScheduleId

      void matchPriceScheduleId(Id priceScheduleId, boolean match)
      Sets the price schedule Id for this query.
      Parameters:
      priceScheduleId - a price schedule Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - priceScheduleId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearPriceScheduleIdTerms

      void clearPriceScheduleIdTerms()
      Clears the price schedule Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsPriceScheduleQuery

      boolean supportsPriceScheduleQuery()
      Tests if a price schedule query is available.
      Returns:
      true if a price schedule query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getPriceScheduleQuery

      PriceScheduleQuery getPriceScheduleQuery()
      Gets the query for a price schedule.
      Returns:
      the price schedule query
      Throws:
      UnimplementedException - supportsPriceScheduleQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsPriceScheduleQuery()} is {@code true} .
    • matchAnyPriceSchedule

      void matchAnyPriceSchedule(boolean match)
      Matches products with any price schedule.
      Parameters:
      match - true to match products with any price schedule, false to match products with no price schedule
      Compliance:
      mandatory - This method must be implemented.
    • clearPriceScheduleTerms

      void clearPriceScheduleTerms()
      Clears the price schedule terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAvailability

      void matchAvailability(long low, long high, boolean match)
      Matches product availability between the given range inclusive.
      Parameters:
      low - a product code
      high - a string match type
      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.
    • matchAnyAvailability

      void matchAnyAvailability(boolean match)
      Matches products with any availability set.
      Parameters:
      match - true to match products with anyavailability value, false to match products with no availability value
      Compliance:
      mandatory - This method must be implemented.
    • clearAvailabilityTerms

      void clearAvailabilityTerms()
      Clears the availability terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchItemId

      void matchItemId(Id itemId, boolean match)
      Sets the item Id for this query.
      Parameters:
      itemId - an item Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - priceScheduleId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearItemIdTerms

      void clearItemIdTerms()
      Clears the item Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsItemQuery

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

      ItemQuery getItemQuery()
      Gets the query for an item.
      Returns:
      the item query
      Throws:
      UnimplementedException - supportsItemQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsItemQuery()} is {@code true} .
    • matchAnyItem

      void matchAnyItem(boolean match)
      Matches prices used with any item.
      Parameters:
      match - true to match prices with any order, false to match prices with no orders
      Compliance:
      mandatory - This method must be implemented.
    • clearItemTerms

      void clearItemTerms()
      Clears the item terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchStoreId

      void matchStoreId(Id storeId, boolean match)
      Sets the product 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.
    • getProductQueryRecord

      ProductQueryRecord getProductQueryRecord(Type productRecordType) throws OperationFailedException
      Gets the product query record corresponding to the given Product record Type .Multiple record retrievals produce a nested boolean OR term.
      Parameters:
      productRecordType - a product record type
      Returns:
      the product query record
      Throws:
      NullArgumentException - productRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(productRecordType) is false
      Compliance:
      mandatory - This method must be implemented.