Interface MeterSearchSession
- All Superinterfaces:
AutoCloseable, Closeable, MeterQuerySession, OsidSession, OsidSession
This session provides methods for searching among meters. The search
query is constructed using the MeterQuery .
getMetersByQuery() is the basic search method and returns a list
of meters. A more advanced search may be performed with
getMetersBySearch() .It accepts a MeterSearch in addition to the
query for the purpose of specifying additional options affecting the
entire search, such as ordering. getMetersBySearch() returns a
MeterSearchResults that can be used to access the resulting
MeterList or be used to perform a search within the result set through
MeterSearch .
This session defines views that offer differing behaviors for searching.
- federated utility view: searches include meters in utilities of which this utility is an ancestor in the utility hierarchy
- isolated utility view: searches are restricted to meters in this utility only
-
Method Summary
Modifier and TypeMethodDescriptiongetMeterQueryFromInspector(MeterQueryInspector meterQueryInspector) Gets a meter query from an inspector.getMetersBySearch(MeterQuery meterQuery, MeterSearch meterSearch) Gets the search results matching the given search query using the given search.Gets a meter search.Gets a meter search order.Methods inherited from interface MeterQuerySession
canSearchMeters, getMeterQuery, getMetersByQuery, getUtility, getUtilityId, useFederatedUtilityView, useIsolatedUtilityViewModifier and TypeMethodDescriptionbooleanTests if this user can performMetersearches.Gets a meter query.getMetersByQuery(MeterQuery meterQuery) Gets a list of meters matching the given meter query.Gets theUtilityassociated with this session.Gets theUtilityIdassociated with this session.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.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.
-
Method Details
-
getMeterSearch
MeterSearch getMeterSearch()Gets a meter search.- Returns:
- the meter search
- Compliance:
mandatory- This method must be implemented.
-
getMeterSearchOrder
MeterSearchOrder getMeterSearchOrder()Gets a meter search order. TheMeterSearchOrderis supplied to aMeterSearchto specify the ordering of results.- Returns:
- the meter search order
- Compliance:
mandatory- This method must be implemented.
-
getMetersBySearch
MeterSearchResults getMetersBySearch(MeterQuery meterQuery, MeterSearch meterSearch) throws OperationFailedException, PermissionDeniedException Gets the search results matching the given search query using the given search.- Parameters:
meterQuery- the meter querymeterSearch- the meter search- Returns:
- the returned search results
- Throws:
NullArgumentException-meterQueryormeterSearchisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-meterQueryormeterSearchis not of this service- Compliance:
mandatory- This method must be implemented.
-
getMeterQueryFromInspector
Gets a meter query from an inspector. The inspector is available from aMeterSearchResults.- Parameters:
meterQueryInspector- a meter query inspector- Returns:
- the meter query
- Throws:
NullArgumentException-meterQueryInspectorisnullUnsupportedException-meterQueryInspectoris not of this service- Compliance:
mandatory- This method must be implemented.
-