Interface StockQuery

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

public interface StockQuery extends OsidObjectQuery, OsidFederateableQuery

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

  • Method Details

    • matchSKU

      void matchSKU(String sku, Type stringMatchType, boolean match)
      Matches a sku number.
      Parameters:
      sku - a sku
      stringMatchType - a string match type
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - sku or stringMatchType is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnySKU

      void matchAnySKU(boolean match)
      Matches items that have any sku.
      Parameters:
      match - true to match items with any sku, false to match items with no sku
      Compliance:
      mandatory - This method must be implemented.
    • clearSKUTerms

      void clearSKUTerms()
      Clears the sku terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchModelId

      void matchModelId(Id modelId, boolean match)
      Sets the model Id for this query.
      Parameters:
      modelId - a model Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - modelId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearModelIdTerms

      void clearModelIdTerms()
      Clears the model Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsModelQuery

      boolean supportsModelQuery()
      Tests if a ModelQuery is available.
      Returns:
      true if a model query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getModelQuery

      ModelQuery getModelQuery()
      Gets the query for an inventory. Multiple retrievals produce a nested OR term.
      Returns:
      the model query
      Throws:
      UnimplementedException - supportsModelQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsModelQuery()} is {@code true} .
    • matchAnyModel

      void matchAnyModel(boolean match)
      Matches any related model.
      Parameters:
      match - true to match stocks with any model, false to match stocks with no models
      Compliance:
      mandatory - This method must be implemented.
    • clearModelTerms

      void clearModelTerms()
      Clears the model terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchLocationDescription

      void matchLocationDescription(String location, Type stringMatchType, boolean match)
      Matches a location description.
      Parameters:
      location - a location string
      stringMatchType - a string match type
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - location or stringMatchType is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyLocationDescription

      void matchAnyLocationDescription(boolean match)
      Matches items that have any location description.
      Parameters:
      match - true to match stocks with any location string, false to match stocks with no location string
      Compliance:
      mandatory - This method must be implemented.
    • clearLocationDescriptionTerms

      void clearLocationDescriptionTerms()
      Clears the location description terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchLocationId

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

      void clearLocationIdTerms()
      Clears the location Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsLocationQuery

      boolean supportsLocationQuery()
      Tests if a LocationQuery is available.
      Returns:
      true if a location query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getLocationQuery

      LocationQuery getLocationQuery()
      Gets the query for a location. Multiple retrievals produce a nested OR term.
      Returns:
      the location query
      Throws:
      UnimplementedException - supportsLocationQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsLocationQuery()} is {@code true} .
    • matchAnyLocation

      void matchAnyLocation(boolean match)
      Matches items that have any location.
      Parameters:
      match - true to match stocks with any location, false to match stocks with no location
      Compliance:
      mandatory - This method must be implemented.
    • clearLocationTerms

      void clearLocationTerms()
      Clears the location terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAncestorStockId

      void matchAncestorStockId(Id stockId, boolean match)
      Sets the stock Id for this query to match stocks that have the specified stock as an ancestor.
      Parameters:
      stockId - a 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.
    • clearAncestorStockIdTerms

      void clearAncestorStockIdTerms()
      Clears the ancestor stock Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAncestorStockQuery

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

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

      void matchAnyAncestorStock(boolean match)
      Matches stocks with any stock ancestor.
      Parameters:
      match - true to match stocks with any ancestor, false to match root stocks
      Compliance:
      mandatory - This method must be implemented.
    • clearAncestorStockTerms

      void clearAncestorStockTerms()
      Clears the ancestor stock query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDescendantStockId

      void matchDescendantStockId(Id stockId, boolean match)
      Sets the stock Id for this query to match stocks that have the specified stock as an descendant.
      Parameters:
      stockId - a 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.
    • clearDescendantStockIdTerms

      void clearDescendantStockIdTerms()
      Clears the descendant stock Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDescendantStockQuery

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

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

      void matchAnyDescendantStock(boolean match)
      Matches stocks with any descendant stock.
      Parameters:
      match - true to match stocks with any descendant, false to match leaf stocks
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantStockTerms

      void clearDescendantStockTerms()
      Clears the descendant stock query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchWarehouseId

      void matchWarehouseId(Id warehouseId, boolean match)
      Sets the warehouse Id for this query to match stocks 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.
    • getStockQueryRecord

      StockQueryRecord getStockQueryRecord(Type stockRecordType) throws OperationFailedException
      Gets the stock query record corresponding to the given Stock record Type .Multiple record retrievals produce a nested OR term.
      Parameters:
      stockRecordType - a stock record type
      Returns:
      the stock query record
      Throws:
      NullArgumentException - stockRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(stockRecordType) is false
      Compliance:
      mandatory - This method must be implemented.