Interface StockSearchSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, 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 Summary
Modifier and TypeMethodDescriptiongetStockQueryFromInspector(ItemQueryInspector stockQueryInspector) Gets a stock query from an inspector.getStocksBySearch(StockQuery stockQuery, StockSearch stockSearch) Gets the search results matching the given search query using the given search.Gets a stock search.Gets a stock search order.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.Methods inherited from interface StockQuerySession
canSearchStocks, getStockQuery, getStocksByQuery, getWarehouse, getWarehouseId, useFederatedWarehouseView, useIsolatedWarehouseViewModifier and TypeMethodDescriptionbooleanTests if this user can performStocklookups.Gets a stock query.getStocksByQuery(StockQuery stockQuery) Gets a list ofStocksmatching the given stock query.Gets theWarehouseassociated with this session.Gets theWarehouseIdassociated with this session.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.
-
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. TheStockSearchOrderis supplied to aStockSearchto specify the ordering of results.- Returns:
- the stock search order
- Compliance:
mandatory- This method must be implemented.
-
getStocksBySearch
StockSearchResults getStocksBySearch(StockQuery stockQuery, StockSearch stockSearch) throws OperationFailedException, PermissionDeniedException Gets the search results matching the given search query using the given search.- Parameters:
stockQuery- the stock querystockSearch- the stock search- Returns:
- the stock search results
- Throws:
NullArgumentException-stockQueryorstockSearchisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-stockQueryorstockSearchis not of this service- Compliance:
mandatory- This method must be implemented.
-
getStockQueryFromInspector
Gets a stock query from an inspector. The inspector is available from aStockSearchResults.- Parameters:
stockQueryInspector- a stock query inspector- Returns:
- the stock query
- Throws:
NullArgumentException-stockQueryInspectorisnullUnsupportedException-stockQueryInspectoris not of this service- Compliance:
mandatory- This method must be implemented.
-