public class SimpleBundleProvider extends Object implements IBundleProvider
| Constructor and Description |
|---|
SimpleBundleProvider()
Create an empty bundle
|
SimpleBundleProvider(org.hl7.fhir.instance.model.api.IBaseResource theResource) |
SimpleBundleProvider(List<org.hl7.fhir.instance.model.api.IBaseResource> theList) |
SimpleBundleProvider(List<org.hl7.fhir.instance.model.api.IBaseResource> theList,
String theUuid) |
| Modifier and Type | Method and Description |
|---|---|
protected List<org.hl7.fhir.instance.model.api.IBaseResource> |
getList()
Returns the results stored in this provider
|
org.hl7.fhir.instance.model.api.IPrimitiveType<Date> |
getPublished()
Returns the instant as of which this result was created.
|
List<org.hl7.fhir.instance.model.api.IBaseResource> |
getResources(int theFromIndex,
int theToIndex)
Load the given collection of resources by index, plus any additional resources per the
server's processing rules (e.g.
|
String |
getUuid()
Returns the UUID associated with this search.
|
Integer |
preferredPageSize()
Defaults to null
|
void |
setPreferredPageSize(Integer thePreferredPageSize)
Sets the preferred page size to be returned by
preferredPageSize(). |
void |
setPublished(org.hl7.fhir.instance.model.api.IPrimitiveType<Date> thePublished)
By default this class uses the object creation date/time (for this object)
to determine
the published date but this
method may be used to specify an alternate date/time |
SimpleBundleProvider |
setSize(Integer theSize)
Sets the total number of results, if this provider
corresponds to a single page within a larger search result
|
Integer |
size()
Returns the total number of results which match the given query (exclusive of any
_include's or OperationOutcome).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCurrentPageId, getNextPageId, getPreviousPageIdpublic SimpleBundleProvider(List<org.hl7.fhir.instance.model.api.IBaseResource> theList)
public SimpleBundleProvider(org.hl7.fhir.instance.model.api.IBaseResource theResource)
public SimpleBundleProvider()
public SimpleBundleProvider(List<org.hl7.fhir.instance.model.api.IBaseResource> theList, String theUuid)
protected List<org.hl7.fhir.instance.model.api.IBaseResource> getList()
public org.hl7.fhir.instance.model.api.IPrimitiveType<Date> getPublished()
IBundleProviderlastUpdated
value on search result/history result bundles.getPublished in interface IBundleProviderpublic void setPublished(org.hl7.fhir.instance.model.api.IPrimitiveType<Date> thePublished)
the published date but this
method may be used to specify an alternate date/timepublic List<org.hl7.fhir.instance.model.api.IBaseResource> getResources(int theFromIndex, int theToIndex)
IBundleProvider
Note that if this bundle provider was loaded using a
page ID (i.e. via IPagingProvider.retrieveResultList(String, String)
because IBundleProvider.getNextPageId() provided a value on the
previous page, then the indexes should be ignored and the
whole page returned.
getResources in interface IBundleProvidertheFromIndex - The low index (inclusive) to returntheToIndex - The high index (exclusive) to returntheToIndex - theFromIndex.public String getUuid()
IBundleProvider
In other words, if you are using the default FifoMemoryPagingProvider in
your server, it is fine for this method to simply return null since FifoMemoryPagingProvider
does not use the value anyhow. On the other hand, if you are creating a custom
IPagingProvider implementation you might use this method to communicate
the search ID back to the provider.
Note that the UUID returned by this method corresponds to the search, and not to the individual page.
getUuid in interface IBundleProviderpublic Integer preferredPageSize()
preferredPageSize in interface IBundleProvidernullpublic void setPreferredPageSize(Integer thePreferredPageSize)
preferredPageSize().
Default is null.public SimpleBundleProvider setSize(Integer theSize)
public Integer size()
IBundleProvidersize in interface IBundleProviderCopyright © 2014–2019 University Health Network. All rights reserved.