Interface PriceQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidExtensibleQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidOperableQuery, OsidQuery, OsidRuleQuery, OsidSubjugateableQuery, Suppliable

public interface PriceQuery extends OsidRuleQuery, OsidSubjugateableQuery

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

  • Method Details

    • 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} .
    • clearPriceScheduleTerms

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

      void matchMinimumQuantity(long low, long high, boolean match)
      Matches the minimum quantity 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
      Compliance:
      mandatory - This method must be implemented.
    • clearMinimumQuantityTerms

      void clearMinimumQuantityTerms()
      Clears the minimum quantity terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchMaximumQuantity

      void matchMaximumQuantity(long low, long high, boolean match)
      Matches the maximum quantity 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
      Compliance:
      mandatory - This method must be implemented.
    • clearMaximumQuantityTerms

      void clearMaximumQuantityTerms()
      Clears the maximum quantity terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDemographicId

      void matchDemographicId(Id resourceId, boolean match)
      Sets the resource Id for this query.
      Parameters:
      resourceId - a resource Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - resource is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDemographicIdTerms

      void clearDemographicIdTerms()
      Clears the resource Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDemographicQuery

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

      ResourceQuery getDemographicQuery()
      Gets the query for a resource.
      Returns:
      the resource query
      Throws:
      UnimplementedException - supportsDemographicQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDemographicQuery()} is {@code true} .
    • matchAnyDemographic

      void matchAnyDemographic(boolean match)
      Matches prices with any demographic.
      Parameters:
      match - true to match prices with any demographic, false to match prices with no orders
      Compliance:
      mandatory - This method must be implemented.
    • clearDemographicTerms

      void clearDemographicTerms()
      Clears the resource 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.
    • matchMinimumAmount

      void matchMinimumAmount(Currency amount, boolean match)
      Matches the a minimum price amount.
      Parameters:
      amount - an amount
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearMinimumAmountTerms

      void clearMinimumAmountTerms()
      Clears the minimum amount terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchRecurringInterval

      void matchRecurringInterval(Duration low, Duration high, boolean match)
      Matches the recurring interval between the given duration 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 prices with any recurring interval.
      Parameters:
      match - true to match prices with any recurring interval, false to match one-time prices
      Compliance:
      mandatory - This method must be implemented.
    • clearRecurringIntervalTerms

      void clearRecurringIntervalTerms()
      Clears the recurring interval 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 price 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.
    • getPriceQueryRecord

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