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