Interface InventoryQuery

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

public interface InventoryQuery extends OsidObjectQuery, OsidSubjugateableQuery

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

  • Method Details

    • matchStockId

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

      void clearStockIdTerms()
      Clears the stock Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsStockQuery

      boolean supportsStockQuery()
      Tests if a StockQuery is available.
      Returns:
      true if a stock query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getStockQuery

      StockQuery getStockQuery()
      Gets the query for a stocjk. Multiple retrievals produce a nested OR term.
      Returns:
      the stock query
      Throws:
      UnimplementedException - supportsStockQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsStockQuery()} is {@code true} .
    • clearStockTerms

      void clearStockTerms()
      Clears the stock terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDate

      void matchDate(DateTime date, boolean match)
      Matches inventories where the given time falls within a denormalized inventory date inclusive.
      Parameters:
      date - a date
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - date is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDateTerms

      void clearDateTerms()
      Clears the meeting time terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDateInclusive

      void matchDateInclusive(DateTime start, DateTime end, boolean match)
      Matches inventories with any denormalized date within the given date range inclusive.
      Parameters:
      start - a start date
      end - an end date
      match - true if a positive match, false for a negative match
      Throws:
      InvalidArgumentException - start is greater than end
      NullArgumentException - start or end is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDateInclusiveTerms

      void clearDateInclusiveTerms()
      Clears the date inclusive terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchQuantity

      void matchQuantity(BigDecimal start, BigDecimal end, boolean match)
      Matches inventories with a quantity within the given range inclusive.
      Parameters:
      start - start range
      end - end range
      match - true if a positive match, false for a negative match
      Throws:
      InvalidArgumentException - start is greater than end
      Compliance:
      mandatory - This method must be implemented.
    • clearQuantityTerms

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

      void matchWarehouseId(Id warehouseId, boolean match)
      Sets the warehouse Id for this query to match inventories assigned to warehouses.
      Parameters:
      warehouseId - the warehouse Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - warehouseId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearWarehouseIdTerms

      void clearWarehouseIdTerms()
      Clears the warehouse Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsWarehouseQuery

      boolean supportsWarehouseQuery()
      Tests if a WarehouseQuery is available.
      Returns:
      true if a warehouse query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getWarehouseQuery

      WarehouseQuery getWarehouseQuery()
      Gets the query for a warehouse. Multiple retrievals produce a nested OR term.
      Returns:
      the warehouse query
      Throws:
      UnimplementedException - supportsWarehouseQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsWarehouseQuery()} is {@code true} .
    • clearWarehouseTerms

      void clearWarehouseTerms()
      Clears the warehouse terms.
      Compliance:
      mandatory - This method must be implemented.
    • getInventoryQueryRecord

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