OSID Logo
OSID Specifications
metering package
Version 3.0.0
Release Candidate Preview
Interfaceosid.metering.UtilitySearchSession
Implementsosid.metering.UtilityQuerySession
Description

This session provides methods for searching Utility objects. The search query is constructed using the UtilityQuery. The utility record Type also specifies the recod for the utility query.

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

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

MethodgetUtilitySearch
Description

Gets a utility search.

Returnosid.metering.UtilitySearchthe utility search
CompliancemandatoryThis method must be implemented.
MethodgetUtilitySearchOrder
Description

Gets a utility search order. The UtilitySearchOrder is supplied to a UtilitySearch to specify the ordering of results.

Returnosid.metering.UtilitySearchOrderthe utility search order
CompliancemandatoryThis method must be implemented.
MethodgetUtilitiesBySearch
Description

Gets the search results matching the given search.

Parametersosid.metering.UtilityQueryutilityQuerythe utility query
osid.metering.UtilitySearchutilitySearchthe utility search
Returnosid.metering.UtilitySearchResultsthe utility search results
ErrorsNULL_ARGUMENT utilityQuery or utilitySearch is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED utilityQuery or utilitySearch is not of this service
CompliancemandatoryThis method must be implemented.
MethodgetUtilityQueryFromInspector
Description

Gets a utility query from an inspector. The inspector is available from a UtilitySearchResults.

Parametersosid.metering.UtilityQueryInspectorutilityQueryInspectora utility query inspector
Returnosid.metering.UtilityQuerythe utility query
ErrorsNULL_ARGUMENT utilityQueryInspector is null
UNSUPPORTED utilityQueryInspector is not of this service
CompliancemandatoryThis method must be implemented.