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