OSID Logo
OSID Specifications
ordering package
Version 3.0.0
Release Candidate Preview
Interfaceosid.ordering.ProductSearchSession
Implementsosid.ordering.ProductQuerySession
Description

This session provides methods for searching Product objects. The search query is constructed using the ProductQuery. The product record Type also specifies the record for the product query.

getProductsByQuery() is the basic search method and returns a list of Product elements. A more advanced search may be performed with getProductsBySearch(). It accepts a ProductSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getProductsBySearch() returns a ProductSearchResults that can be used to access the resulting ProductList or be used to perform a search within the result set through ProductSearch.

Products may have a query record indicated by their respective record types. The query record is accessed via the ProductQuery. The returns in this session may not be cast directly to these interfaces.

MethodgetProductSearch
Description

Gets a product search.

Returnosid.ordering.ProductSearchthe product search
CompliancemandatoryThis method must be implemented.
MethodgetProductSearchOrder
Description

Gets a product search order. The ProductSearchOrder is supplied to a ProductSearch to specify the ordering of results.

Returnosid.ordering.ProductSearchOrderthe product search order
CompliancemandatoryThis method must be implemented.
MethodgetProductsBySearch
Description

Gets the search results matching the given search.

Parametersosid.ordering.ProductQueryproductQuerythe product query
osid.ordering.ProductSearchproductSearchthe product search
Returnosid.ordering.ProductSearchResultsthe product search results
ErrorsNULL_ARGUMENT productQuery or productSearch is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED productQuery or productSearch is not of this service
CompliancemandatoryThis method must be implemented.
MethodgetProductQueryFromInspector
Description

Gets a product query from an inspector. The inspector is available from a ProductSearchResults.

Parametersosid.ordering.ProductQueryInspectorproductQueryInspectora query inspector
Returnosid.ordering.ProductQuerythe product query
ErrorsNULL_ARGUMENT productQueryInspector is null
UNSUPPORTED productQueryInspector is not of this service
CompliancemandatoryThis method must be implemented.