Interface OrderQuery

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

public interface OrderQuery extends OsidObjectQuery, OsidAggregateableQuery

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

  • Method Details

    • matchCustomerId

      void matchCustomerId(Id customerId, boolean match)
      Sets the item Id for this query to match orders by customers.
      Parameters:
      customerId - a customer Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - itemId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCustomerIdTerms

      void clearCustomerIdTerms()
      Clears the customer Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCustomerQuery

      boolean supportsCustomerQuery()
      Tests if a CustomerQuery is available.
      Returns:
      true if a customer query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCustomerQuery

      ResourceQuery getCustomerQuery()
      Gets the query for a customer query. Multiple retrievals produce a nested OR term.
      Returns:
      the customer query
      Throws:
      UnimplementedException - supportsCustomerQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCustomerQuery()} is {@code true} .
    • clearCustomerTerms

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

      void matchItemId(Id itemId, boolean match)
      Sets the item Id for this query to match orders assigned to items.
      Parameters:
      itemId - an item Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - itemId 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 ItemQuery 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 query. Multiple retrievals produce a nested OR term.
      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 orders with any item.
      Parameters:
      match - true for a to matc h odrers with any items, false to match orders with no items
      Compliance:
      mandatory - This method must be implemented.
    • clearItemTerms

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

      void matchTotalCost(Currency low, Currency high, boolean match)
      Matches total 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
      Compliance:
      mandatory - This method must be implemented.
    • clearTotalCostTerms

      void clearTotalCostTerms()
      Clears the total cost terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchMinimumTotalCost

      void matchMinimumTotalCost(Currency cost, boolean match)
      Matches total costs greter than or equal to the given cost.
      Parameters:
      cost - a cost
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearMinimumTotalCostTerms

      void clearMinimumTotalCostTerms()
      Clears the minimum total cost terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAtomic

      void matchAtomic(boolean match)
      Matches atomic orders.
      Parameters:
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearAtomicTerms

      void clearAtomicTerms()
      Clears the atomic terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchSubmitDate

      void matchSubmitDate(DateTime from, DateTime to, boolean match)
      Matches orders submitted between the given time range inclusive.
      Parameters:
      from - starting time range
      to - ending time range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - itemId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearSubmitDateTerms

      void clearSubmitDateTerms()
      Clears the submit date terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchSubmitterId

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

      void clearSubmitterIdTerms()
      Clears the submitter Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsSubmitterQuery

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

      ResourceQuery getSubmitterQuery()
      Gets the query for a submitting agent query. Multiple retrievals produce a nested OR term.
      Returns:
      the resource query
      Throws:
      UnimplementedException - supportsSubmitterQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsSubmitterQuery()} is {@code true} .
    • matchAnySubmitter

      void matchAnySubmitter(boolean match)
      Matches any submitted order.
      Parameters:
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearSubmitterTerms

      void clearSubmitterTerms()
      Clears the submitter terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchSubmittingAgentId

      void matchSubmittingAgentId(Id agentId, boolean match)
      Sets a submitting agent Id .
      Parameters:
      agentId - an agent Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - agentId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearSubmittingAgentIdTerms

      void clearSubmittingAgentIdTerms()
      Clears the submitter Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsSubmittingAgentQuery

      boolean supportsSubmittingAgentQuery()
      Tests if an AgentQuery is available.
      Returns:
      true if an agent query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getSubmittingAgentQuery

      AgentQuery getSubmittingAgentQuery()
      Gets the query for a submitting agent query. Multiple retrievals produce a nested OR term.
      Returns:
      the agent query
      Throws:
      UnimplementedException - supportsSubmittingAgentQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsSubmittingAgentQuery()} is {@code true} .
    • matchAnySubmittingAgent

      void matchAnySubmittingAgent(boolean match)
      Matches any submitted order.
      Parameters:
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearSubmittingAgentTerms

      void clearSubmittingAgentTerms()
      Clears the submitter terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchClosedDate

      void matchClosedDate(DateTime from, DateTime to, boolean match)
      Matches orders closed between the given time range inclusive.
      Parameters:
      from - starting time range
      to - ending time range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - itemId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearClosedDateTerms

      void clearClosedDateTerms()
      Clears the closed date terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCloserId

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

      void clearCloserIdTerms()
      Clears the closer Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCloserQuery

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

      ResourceQuery getCloserQuery()
      Gets the query for a closer resource query. Multiple retrievals produce a nested OR term.
      Returns:
      the resource query
      Throws:
      UnimplementedException - supportsCloserQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCloserQuery()} is {@code true} .
    • matchAnyCloser

      void matchAnyCloser(boolean match)
      Matches any closed order.
      Parameters:
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearCloserTerms

      void clearCloserTerms()
      Clears the closer terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchClosingAgentId

      void matchClosingAgentId(Id agentId, boolean match)
      Sets a closing agent Id .
      Parameters:
      agentId - an agent Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - agentId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearClosingAgentIdTerms

      void clearClosingAgentIdTerms()
      Clears the closer Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsClosingAgentQuery

      boolean supportsClosingAgentQuery()
      Tests if an AgentQuery is available.
      Returns:
      true if an agent query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getClosingAgentQuery

      AgentQuery getClosingAgentQuery()
      Gets the query for a closing agent query. Multiple retrievals produce a nested OR term.
      Returns:
      the agent query
      Throws:
      UnimplementedException - supportsClosingAgentQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsClosingAgentQuery()} is {@code true} .
    • matchAnyClosingAgent

      void matchAnyClosingAgent(boolean match)
      Matches any closed order.
      Parameters:
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearClosingAgentTerms

      void clearClosingAgentTerms()
      Clears the closer 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.
    • getOrderQueryRecord

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