Interface StockSearchSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, StockQuerySession

public interface StockSearchSession extends StockQuerySession

This session provides methods for searching among Stocks . The search query is constructed using the StockQuery .

getStocksByQuery() is the basic search method and returns a list of Stocks . A more advanced search may be performed with getStocksBySearch() . It accepts a StockSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getStocksBySearch() returns a StockSearchResults that can be used to access the resulting StockList or be used to perform a search within the result set through StockSearch .

This session defines views that offer differing behaviors for searching.

  • federated warehouse view: searches include stocks in warehouses of which this warehouse is an ancestor in the warehouse hierarchy
  • isolated warehouse view: searches are restricted to stocks in this warehouse

Stocks may have a query record indicated by their respective record types. The queryrecord is accessed via the StockQuery .

  • Method Details

    • getStockSearch

      StockSearch getStockSearch()
      Gets a stock search.
      Returns:
      the stock search
      Compliance:
      mandatory - This method must be implemented.
    • getStockSearchOrder

      StockSearchOrder getStockSearchOrder()
      Gets a stock search order. The StockSearchOrder is supplied to a StockSearch to specify the ordering of results.
      Returns:
      the stock search order
      Compliance:
      mandatory - This method must be implemented.
    • getStocksBySearch

      Gets the search results matching the given search query using the given search.
      Parameters:
      stockQuery - the stock query
      stockSearch - the stock search
      Returns:
      the stock search results
      Throws:
      NullArgumentException - stockQuery or stockSearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - stockQuery or stockSearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getStockQueryFromInspector

      StockQuery getStockQueryFromInspector(ItemQueryInspector stockQueryInspector)
      Gets a stock query from an inspector. The inspector is available from a StockSearchResults .
      Parameters:
      stockQueryInspector - a stock query inspector
      Returns:
      the stock query
      Throws:
      NullArgumentException - stockQueryInspector is null
      UnsupportedException - stockQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.