Interface ResultLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ResultLookupSession extends 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 Details

    • getCatalogueId

      Id getCatalogueId()
      Gets the Catalogue Id associated with this session.
      Returns:
      the Catalogue Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCatalogue

      Gets the Catalogue associated with this session.
      Returns:
      the catalogue
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer these operations.
      Returns:
      false if catalogue reading methods are not authorized, true otherwise
      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 the Result returns 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

      Gets the Result specified by its Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Result may have a different Id than requested, such as the case where a duplicate Id was assigned to a Result and 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 - the Id of the Result to retrieve
      Returns:
      the returned Result
      Throws:
      NotFoundException - no Result found with the given Id
      NullArgumentException - resultId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResultsByIds

      Gets a ResultList corresponding to the given IdList . In plenary mode, the returned list contains all of the results specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in 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 of Ids to retrieve
      Returns:
      the returned Result list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - resultIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResultsByGenusType

      ResultList getResultsByGenusType(Type resultGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a ResultList corresponding to the given result genus Type which does not include results of types derived from the specified Type . 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 - resultGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResultsByParentGenusType

      ResultList getResultsByParentGenusType(Type resultGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a ResultList corresponding to the given result genus Type and include any additional results with genus types derived from the specified Type . 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 - resultGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResultsByRecordType

      ResultList getResultsByRecordType(Type resultRecordType) throws OperationFailedException, PermissionDeniedException
      Gets a ResultList containing the given result record Type . 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 - resultRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResultsOnDate

      Gets a ResultList 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:
      from - start of date range
      to - end of date range
      Returns:
      the returned ResultList
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResultsByGenusTypeOnDate

      ResultList getResultsByGenusTypeOnDate(Type resultGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a ResultList by 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 type
      from - start of date range
      to - end of date range
      Returns:
      the returned ResultList
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - resultGenusType, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResultsForParticipant

      ResultList getResultsForParticipant(Id participantId) throws OperationFailedException, PermissionDeniedException
      Gets a ResultList for the given participant Id . 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, inaccessible Results may 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 participant Id
      Returns:
      the returned ResultList
      Throws:
      NullArgumentException - participantId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResultsByGenusTypeForParticipant

      ResultList getResultsByGenusTypeForParticipant(Id participantId, Type resultGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a ResultList for the given participant Id . 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, inaccessible Results may 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 participant Id
      resultGenusType - a results genus type
      Returns:
      the returned ResultList
      Throws:
      NullArgumentException - participantId or resultGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 participant Id
      from - start of date range
      to - end of date range
      Returns:
      the returned ResultList
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - participantId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 participant Id
      resultGenusType - a results genus type
      from - start of date range
      to - end of date range
      Returns:
      the returned ResultList
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - participantId, resultGenusType, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.