Skip to content

Commit cbfb3a9

Browse files
committed
Replace get() with variable arguments
1 parent 89417fd commit cbfb3a9

File tree

3 files changed

+0
-18
lines changed

3 files changed

+0
-18
lines changed

engine/src/main/java/com/google/android/fhir/FhirEngine.kt

-11
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,6 @@ interface FhirEngine {
7272
*/
7373
suspend fun create(vararg resource: Resource): List<String>
7474

75-
/**
76-
* Loads a FHIR resource given its [ResourceType] and logical ID.
77-
*
78-
* @param type The type of the resource to load.
79-
* @param id The logical ID of the resource.
80-
* @return The requested FHIR resource.
81-
* @throws ResourceNotFoundException if the resource is not found.
82-
*/
83-
@Throws(ResourceNotFoundException::class)
84-
suspend fun get(type: ResourceType, id: String): Resource
85-
8675
/**
8776
* Loads multiple FHIR resources given [ResourceType] and logical IDs.
8877
*

engine/src/main/java/com/google/android/fhir/impl/FhirEngineImpl.kt

-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ internal class FhirEngineImpl(private val database: Database, private val contex
4949
override suspend fun create(vararg resource: Resource) =
5050
withContext(Dispatchers.IO) { database.insert(*resource) }
5151

52-
override suspend fun get(type: ResourceType, id: String) =
53-
withContext(Dispatchers.IO) { database.select(type, id) }
54-
5552
override suspend fun get(type: ResourceType, vararg ids: String) =
5653
withContext(Dispatchers.IO) { ids.map { id -> database.select(type, id) } }
5754

engine/src/main/java/com/google/android/fhir/testing/Utilities.kt

-4
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,6 @@ internal object TestFhirEngineImpl : FhirEngine {
147147

148148
override suspend fun update(vararg resource: Resource) {}
149149

150-
override suspend fun get(type: ResourceType, id: String): Resource {
151-
return Patient()
152-
}
153-
154150
override suspend fun get(type: ResourceType, vararg ids: String): List<Resource> {
155151
return ids.map { Patient().apply { id = it } }
156152
}

0 commit comments

Comments
 (0)