T - The resource type to supportpublic class HashMapResourceProvider<T extends org.hl7.fhir.instance.model.api.IBaseResource> extends Object implements IResourceProvider
This class currently supports the following FHIR operations:
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,LinkedList<T>> |
myIdToHistory |
protected Map<String,TreeMap<Long,T>> |
myIdToVersionToResourceMap |
protected LinkedList<T> |
myTypeHistory |
| Constructor and Description |
|---|
HashMapResourceProvider(ca.uhn.fhir.context.FhirContext theFhirContext,
Class<T> theResourceType)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all data held in this resource provider
|
void |
clearCounts()
Clear the counts used by
getCountRead() and other count methods |
ca.uhn.fhir.rest.api.MethodOutcome |
create(T theResource) |
ca.uhn.fhir.rest.api.MethodOutcome |
delete(org.hl7.fhir.instance.model.api.IIdType theId) |
long |
getCountCreate()
This method returns a simple operation count.
|
long |
getCountDelete()
This method returns a simple operation count.
|
long |
getCountRead()
This method returns a simple operation count.
|
long |
getCountSearch()
This method returns a simple operation count.
|
long |
getCountUpdate()
This method returns a simple operation count.
|
Class<T> |
getResourceType()
Returns the type of resource returned by this provider
|
List<T> |
historyInstance(org.hl7.fhir.instance.model.api.IIdType theId) |
List<T> |
historyType() |
T |
read(org.hl7.fhir.instance.model.api.IIdType theId) |
List<T> |
searchAll() |
List<T> |
searchById(ca.uhn.fhir.rest.param.TokenAndListParam theIds) |
ca.uhn.fhir.rest.api.MethodOutcome |
update(T theResource,
String theConditional) |
protected Map<String,TreeMap<Long,T extends org.hl7.fhir.instance.model.api.IBaseResource>> myIdToVersionToResourceMap
protected Map<String,LinkedList<T extends org.hl7.fhir.instance.model.api.IBaseResource>> myIdToHistory
protected LinkedList<T extends org.hl7.fhir.instance.model.api.IBaseResource> myTypeHistory
public HashMapResourceProvider(ca.uhn.fhir.context.FhirContext theFhirContext, Class<T> theResourceType)
theFhirContext - The FHIR contexttheResourceType - The resource type to supportpublic void clear()
public void clearCounts()
getCountRead() and other count methodspublic ca.uhn.fhir.rest.api.MethodOutcome delete(org.hl7.fhir.instance.model.api.IIdType theId)
public long getCountCreate()
public long getCountDelete()
public long getCountRead()
public long getCountSearch()
public long getCountUpdate()
public Class<T> getResourceType()
IResourceProvidergetResourceType in interface IResourceProviderpublic List<T> historyInstance(org.hl7.fhir.instance.model.api.IIdType theId)
public List<T> historyType()
public List<T> searchById(ca.uhn.fhir.rest.param.TokenAndListParam theIds)
Copyright © 2014–2019 University Health Network. All rights reserved.