View Javadoc
1   package ca.uhn.fhir.jpa.dao;
2   
3   import java.util.Collection;
4   import java.util.Set;
5   
6   import org.hl7.fhir.instance.model.api.IBaseResource;
7   
8   import ca.uhn.fhir.context.FhirContext;
9   import ca.uhn.fhir.context.RuntimeResourceDefinition;
10  import ca.uhn.fhir.context.RuntimeSearchParam;
11  import ca.uhn.fhir.jpa.entity.BaseHasResource;
12  import ca.uhn.fhir.jpa.entity.IBaseResourceEntity;
13  import ca.uhn.fhir.jpa.entity.ResourceTable;
14  import ca.uhn.fhir.jpa.entity.ResourceTag;
15  import ca.uhn.fhir.jpa.search.PersistedJpaBundleProvider;
16  
17  /*
18   * #%L
19   * HAPI FHIR JPA Server
20   * %%
21   * Copyright (C) 2014 - 2018 University Health Network
22   * %%
23   * Licensed under the Apache License, Version 2.0 (the "License");
24   * you may not use this file except in compliance with the License.
25   * You may obtain a copy of the License at
26   * 
27   *      http://www.apache.org/licenses/LICENSE-2.0
28   * 
29   * Unless required by applicable law or agreed to in writing, software
30   * distributed under the License is distributed on an "AS IS" BASIS,
31   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32   * See the License for the specific language governing permissions and
33   * limitations under the License.
34   * #L%
35   */
36  
37  public interface IDao {
38  
39  	MetadataKeyResourcePid RESOURCE_PID = new MetadataKeyResourcePid("RESOURCE_PID");
40  
41  	MetadataKeyCurrentlyReindexing CURRENTLY_REINDEXING = new MetadataKeyCurrentlyReindexing("CURRENTLY_REINDEXING");
42  
43  	FhirContext getContext();
44  
45  	RuntimeSearchParam getSearchParamByName(RuntimeResourceDefinition theResourceDef, String theParamName);
46  
47  	Collection<RuntimeSearchParam> getSearchParamsByResourceType(RuntimeResourceDefinition theResourceDef);
48  
49  	/**
50  	 * Populate all of the runtime dependencies that a bundle provider requires in order to work
51  	 */
52  	void injectDependenciesIntoBundleProvider(PersistedJpaBundleProvider theProvider);
53  
54  	ISearchBuilder newSearchBuilder();
55  
56  	void populateFullTextFields(IBaseResource theResource, ResourceTable theEntity);
57  
58  	<R extends IBaseResource> Set<Long> processMatchUrl(String theMatchUrl, Class<R> theResourceType);
59  
60  	IBaseResource toResource(BaseHasResource theEntity, boolean theForHistoryOperation);
61  
62  	<R extends IBaseResource> R toResource(Class<R> theResourceType, IBaseResourceEntity theEntity, Collection<ResourceTag> theTagList, boolean theForHistoryOperation);
63  
64  }