Interface ResultLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for retrieving results.
This lookup session defines several views:
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete result set or is an error condition
- isolated catalogue view: All result methods in this session
operate, retrieve and pertain to results defined explicitly in the
current catalogue. Using an isolated view is useful for managing
results with the
ResultAdminSession. - federated catalogue view: All result lookup methods in this session operate, retrieve and pertain to all results defined in this catalogue and any other catalogues implicitly available in this catalogue through catalogue inheritence.
- effective result view: All result lookup methods return results where the current date falls in between the effective dates inclusive.
- any effective result view: Results of any effective date are returned from methods.
The methods useFederatedCatalogueView() and
useIsolatedCatalogueView() behave as a radio group and one should be
selected before invoking any lookup methods.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can examine this catalogue.Gets theCatalogueassociated with this session.Gets theCatalogueIdassociated with this session.Gets theResultspecified by itsId.Gets all results.getResultsByGenusType(Type resultGenusType) Gets aResultListcorresponding to the given result genusTypewhich does not include results of types derived from the specifiedType.getResultsByGenusTypeForParticipant(Id participantId, Type resultGenusType) Gets aResultListfor the given participantId.getResultsByGenusTypeForParticipantOnDate(Id participantId, Type resultGenusType, DateTime from, DateTime to) Gets a list of results for a participant and effective during the entire given date range inclusive but not confined to the date range.getResultsByGenusTypeOnDate(Type resultGenusType, DateTime from, DateTime to) Gets aResultListby genus type effective during the entire given date range inclusive but not confined to the date range.getResultsByIds(IdList resultIds) Gets aResultListcorresponding to the givenIdList.getResultsByParentGenusType(Type resultGenusType) Gets aResultListcorresponding to the given result genusTypeand include any additional results with genus types derived from the specifiedType.getResultsByRecordType(Type resultRecordType) Gets aResultListcontaining the given result recordType.getResultsForParticipant(Id participantId) Gets aResultListfor the given participantId.getResultsForParticipantOnDate(Id participantId, DateTime from, DateTime to) Gets a list of results for a participant and effective during the entire given date range inclusive but not confined to the date range.getResultsOnDate(DateTime from, DateTime to) Gets aResultListeffective during the entire given date range inclusive but not confined to the date range.voidAll results of any effective dates are returned by methods in this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidOnly results whose effective dates are current are returned by methods in this session.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theResultreturns is desired.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
-
getCatalogueId
Id getCatalogueId()Gets theCatalogueIdassociated with this session.- Returns:
- the
Catalogue Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getCatalogue
Gets theCatalogueassociated with this session.- Returns:
- the catalogue
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupResults
boolean canLookupResults()Tests if this user can examine this catalogue. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer these operations.- Returns:
falseif catalogue reading methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeResultView
void useComparativeResultView()The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryResultView
void usePlenaryResultView()A complete view of theResultreturns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.- Compliance:
mandatory- This method is must be implemented.
-
useFederatedCatalogueView
void useFederatedCatalogueView()Federates the view for methods in this session. A federated view will include results in catalogues which are children of this catalogue in the catalogue hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedCatalogueView
void useIsolatedCatalogueView()Isolates the view for methods in this session. An isolated view restricts retrievals to this catalogue only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectiveResultView
void useEffectiveResultView()Only results whose effective dates are current are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveResultView
void useAnyEffectiveResultView()All results of any effective dates are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getResult
Result getResult(Id resultId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theResultspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedResultmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aResultand retained for compatibility. In effective mode, results are returned that are currently effective. In any effective mode, effective results and those currently expired are returned.- Parameters:
resultId- theIdof theResultto retrieve- Returns:
- the returned
Result - Throws:
NotFoundException- noResultfound with the givenIdNullArgumentException-resultIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResultsByIds
ResultList getResultsByIds(IdList resultIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aResultListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the results specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessible results may be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, results are returned that are currently effective. In any effective mode, effective results and those currently expired are returned.- Parameters:
resultIds- the list ofIdsto retrieve- Returns:
- the returned
Result list - Throws:
NotFoundException- anId wasnot foundNullArgumentException-resultIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResultsByGenusType
ResultList getResultsByGenusType(Type resultGenusType) throws OperationFailedException, PermissionDeniedException Gets aResultListcorresponding to the given result genusTypewhich does not include results of types derived from the specifiedType. In plenary mode, the returned list contains all known results or an error results. Otherwise, the returned list may contain only those results that are accessible through this session. In effective mode, results are returned that are currently effective. In any effective mode, effective results and those currently expired are returned.- Parameters:
resultGenusType- a results genus type- Returns:
- the returned
Result list - Throws:
NullArgumentException-resultGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResultsByParentGenusType
ResultList getResultsByParentGenusType(Type resultGenusType) throws OperationFailedException, PermissionDeniedException Gets aResultListcorresponding to the given result genusTypeand include any additional results with genus types derived from the specifiedType. In plenary mode, the returned list contains all known results or an error results. Otherwise, the returned list may contain only those results that are accessible through this session. In effective mode, results are returned that are currently effective. In any effective mode, effective results and those currently expired are returned.- Parameters:
resultGenusType- a result genus type- Returns:
- the returned
Result list - Throws:
NullArgumentException-resultGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResultsByRecordType
ResultList getResultsByRecordType(Type resultRecordType) throws OperationFailedException, PermissionDeniedException Gets aResultListcontaining the given result recordType. In plenary mode, the returned list contains all known results or an error results. Otherwise, the returned list may contain only those results that are accessible through this session. In effective mode, results are returned that are currently effective. In any effective mode, effective results and those currently expired are returned.- Parameters:
resultRecordType- a result record type- Returns:
- the returned
ResultList - Throws:
NullArgumentException-resultRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResultsOnDate
ResultList getResultsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aResultListeffective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known results or an error results. Otherwise, the returned list may contain only those results that are accessible through this session. In effective mode, results are returned that are currently effective. In any effective mode, effective results and those currently expired are returned.- Parameters:
from- start of date rangeto- end of date range- Returns:
- the returned
ResultList - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-from or toisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResultsByGenusTypeOnDate
ResultList getResultsByGenusTypeOnDate(Type resultGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aResultListby genus type effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known results or an error results. Otherwise, the returned list may contain only those results that are accessible through this session. In effective mode, results are returned that are currently effective. In any effective mode, effective results and those currently expired are returned.- Parameters:
resultGenusType- a results genus typefrom- start of date rangeto- end of date range- Returns:
- the returned
ResultList - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resultGenusType, from or toisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResultsForParticipant
ResultList getResultsForParticipant(Id participantId) throws OperationFailedException, PermissionDeniedException Gets aResultListfor the given participantId. In plenary mode, the returned list contains all of the results corresponding to the given participant, including duplicates, or an error results if a result is inaccessible. Otherwise, inaccessibleResultsmay be omitted from the list. In effective mode, results are returned that are currently effective. In any effective mode, effective results and those currently expired are returned.- Parameters:
participantId- a participantId- Returns:
- the returned
ResultList - Throws:
NullArgumentException-participantIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResultsByGenusTypeForParticipant
ResultList getResultsByGenusTypeForParticipant(Id participantId, Type resultGenusType) throws OperationFailedException, PermissionDeniedException Gets aResultListfor the given participantId. In plenary mode, the returned list contains all of the results corresponding to the given participant, including duplicates, or an error results if a result is inaccessible. Otherwise, inaccessibleResultsmay be omitted from the list. In effective mode, results are returned that are currently effective. In any effective mode, effective results and those currently expired are returned.- Parameters:
participantId- a participantIdresultGenusType- a results genus type- Returns:
- the returned
ResultList - Throws:
NullArgumentException-participantIdorresultGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResultsForParticipantOnDate
ResultList getResultsForParticipantOnDate(Id participantId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of results for a participant and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known results or an error results. Otherwise, the returned list may contain only those results that are accessible through this session. In effective mode, results are returned that are currently effective. In any effective mode, effective results and those currently expired are returned.- Parameters:
participantId- a participantIdfrom- start of date rangeto- end of date range- Returns:
- the returned
ResultList - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-participantId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResultsByGenusTypeForParticipantOnDate
ResultList getResultsByGenusTypeForParticipantOnDate(Id participantId, Type resultGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of results for a participant and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known results or an error results. Otherwise, the returned list may contain only those results that are accessible through this session. In effective mode, results are returned that are currently effective. In any effective mode, effective results and those currently expired are returned.- Parameters:
participantId- a participantIdresultGenusType- a results genus typefrom- start of date rangeto- end of date range- Returns:
- the returned
ResultList - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-participantId, resultGenusType, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResults
Gets all results. In plenary mode, the returned list contains all known results or an error results. Otherwise, the returned list may contain only those results that are accessible through this session. In effective mode, results are returned that are currently effective. In any effective mode, effective results and those currently expired are returned.- Returns:
- a list of results
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-