Class BundleProviderWithNamedPages

java.lang.Object
ca.uhn.fhir.rest.server.SimpleBundleProvider
ca.uhn.fhir.rest.server.BundleProviderWithNamedPages
All Implemented Interfaces:
IBundleProvider

Bundle provider that uses named pages instead of counts
  • Constructor Details

  • Method Details

    • getCurrentPageId

      Description copied from interface: IBundleProvider
      If this method is implemented, provides an ID for the current page of results. This ID should be unique (at least within the current search as identified by IBundleProvider.getUuid()) so that it can be used to look up a specific page of results.

      This can be used in order to allow the server paging mechanism to work using completely opaque links (links that do not encode any index/offset information), which can be useful on some servers.

    • setCurrentPageId

    • getNextPageId

      Description copied from interface: IBundleProvider
      If this method is implemented, provides an ID for the next page of results. This ID should be unique (at least within the current search as identified by IBundleProvider.getUuid()) so that it can be used to look up a specific page of results.

      This can be used in order to allow the server paging mechanism to work using completely opaque links (links that do not encode any index/offset information), which can be useful on some servers.

    • setNextPageId

    • getPreviousPageId

      Description copied from interface: IBundleProvider
      If this method is implemented, provides an ID for the previous page of results. This ID should be unique (at least within the current search as identified by IBundleProvider.getUuid()) so that it can be used to look up a specific page of results.

      This can be used in order to allow the server paging mechanism to work using completely opaque links (links that do not encode any index/offset information), which can be useful on some servers.

    • setPreviousPageId

    • getResources

      @Nonnull public List<org.hl7.fhir.instance.model.api.IBaseResource> getResources(int theFromIndex, int theToIndex, @Nonnull ResponsePage.ResponsePageBuilder theResponsePageBuilder)
      Description copied from interface: IBundleProvider
      Load the given collection of resources by index, plus any additional resources per the server's processing rules (e.g. _include'd resources, OperationOutcome, etc.). For example, if the method is invoked with index 0,10 the method might return 10 search results, plus an additional 20 resources which matched a client's _include specification.

      Note that if this bundle provider was loaded using a page ID (i.e. via IPagingProvider.retrieveResultList(RequestDetails, String, String) because IBundleProvider.getNextPageId() provided a value on the previous page, then the indexes should be ignored and the whole page returned.

      Specified by:
      getResources in interface IBundleProvider
      Overrides:
      getResources in class SimpleBundleProvider
      Parameters:
      theFromIndex - The low index (inclusive) to return
      theToIndex - The high index (exclusive) to return
      theResponsePageBuilder - The ResponsePageBuilder. The builder will add values needed for the response page.
      Returns:
      A list of resources. The size of this list must be at least theToIndex - theFromIndex.
    • setSize

      Description copied from class: SimpleBundleProvider
      Sets the total number of results, if this provider corresponds to a single page within a larger search result
      Overrides:
      setSize in class SimpleBundleProvider