OSID Logo
OSID Specifications
metering package
Version 3.0.0
Release Candidate Preview
Interfaceosid.metering.UtilityQuery
Implementsosid.OsidCatalogQuery
Description

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

MethodmatchMeterId
Description

Sets a meter Id.

Parametersosid.id.IdmeterIda meter Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT meterId is null
CompliancemandatoryThis method must be implemented.
MethodclearMeterIdTerms
Description

Clears the meter Id query terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsMeterQuery
Description

Tests if a meter query is available.

Returnboolean true if a meter query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetMeterQuery
Description

Gets the query for a meter.

Returnosid.metering.MeterQuerythe meter query
ErrorsUNIMPLEMENTED supportsMeterQuery() is false
ComplianceoptionalThis method must be implemented if supportsMeterQuery() is true.
MethodmatchAnyMeter
Description

Matches utilities with any meter.

Parametersbooleanmatch true to match utilities with any meter, false to match utilities with no meters
CompliancemandatoryThis method must be implemented.
MethodclearMeterTerms
Description

Clears the meter query terms.

CompliancemandatoryThis method must be implemented.
MethodmatchAncestorUtilityId
Description

Sets the utility Id for this query to match utilities that have the specified utility as an ancestor.

Parametersosid.id.IdutilityIda utility Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT utilityId is null
CompliancemandatoryThis method must be implemented.
MethodclearAncestorUtilityIdTerms
Description

Clears the ancestor utility Id query terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsAncestorUtilityQuery
Description

Tests if a UtilityQuery is available.

Returnboolean true if a utility query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetAncestorUtilityQuery
Description

Gets the query for a utility. Multiple retrievals produce a nested OR term.

Returnosid.metering.UtilityQuerythe utility query
ErrorsUNIMPLEMENTED supportsAncestorUtilityQuery() is false
ComplianceoptionalThis method must be implemented if supportsAncestorUtilityQuery() is true.
MethodclearAncestorUtilityTerms
Description

Clears the ancestor utility query terms.

CompliancemandatoryThis method must be implemented.
MethodmatchAnyAncestorUtility
Description

Matches utilities with any ancestor.

Parametersbooleanmatch true to match utilities with any ancestor, false to match root utilities
CompliancemandatoryThis method must be implemented.
MethodmatchDescendantUtilityId
Description

Sets the utility Id for this query to match utilities that have the specified utility as a descendant.

Parametersosid.id.IdutilityIda utility Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT utilityId is null
CompliancemandatoryThis method must be implemented.
MethodclearDescendantUtilityIdTerms
Description

Clears the descendant utility Id query terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsDescendantUtilityQuery
Description

Tests if a UtilityQuery is available.

Returnboolean true if a utility query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetDescendantUtilityQuery
Description

Gets the query for a utility. Multiple retrievals produce a nested OR term.

Returnosid.metering.UtilityQuerythe utility query
ErrorsUNIMPLEMENTED supportsDescendantUtilityQuery() is false
ComplianceoptionalThis method must be implemented if supportsDescendantUtilityQuery() is true.
MethodmatchAnyDescendantUtility
Description

Matches utilities with any descendant.

Parametersbooleanmatch true to match utilities with any descendant, false to match leaf utilities
CompliancemandatoryThis method must be implemented.
MethodclearDescendantUtilityTerms
Description

Clears the descendant utility query terms.

CompliancemandatoryThis method must be implemented.
MethodgetUtilityQueryRecord
Description

Gets the utility query record corresponding to the given Utility record Type. Multiple record retrievals produce a nested boolean OR term.

Parametersosid.type.TypeutilityRecordTypea utility record type
Returnosid.metering.records.UtilityQueryRecordthe utility query record
ErrorsNULL_ARGUMENT utilityRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(utilityRecordType) is false
CompliancemandatoryThis method must be implemented.