From 1721a4a6c835e2d0fbc730c6886a72d36cf05d71 Mon Sep 17 00:00:00 2001 From: Martin Ndegwa Date: Wed, 20 Sep 2023 10:51:34 +0300 Subject: [PATCH] Revert "New API to support saving local only resources" This reverts commit 7a45e18cf5280d60b1ebe8dfd08c9745134b4197. The changes will be introduced by the PR https://github.com/google/android-fhir/pull/2178 --- engine/src/main/java/com/google/android/fhir/FhirEngine.kt | 2 -- .../main/java/com/google/android/fhir/impl/FhirEngineImpl.kt | 4 ---- .../main/java/com/google/android/fhir/testing/Utilities.kt | 3 --- 3 files changed, 9 deletions(-) diff --git a/engine/src/main/java/com/google/android/fhir/FhirEngine.kt b/engine/src/main/java/com/google/android/fhir/FhirEngine.kt index 1769bb1b93..38f8d469ce 100644 --- a/engine/src/main/java/com/google/android/fhir/FhirEngine.kt +++ b/engine/src/main/java/com/google/android/fhir/FhirEngine.kt @@ -34,8 +34,6 @@ interface FhirEngine { */ suspend fun create(vararg resource: Resource): List - suspend fun createRemote(vararg resource: Resource) - /** Loads a FHIR resource given the class and the logical ID. */ suspend fun get(type: ResourceType, id: String): Resource diff --git a/engine/src/main/java/com/google/android/fhir/impl/FhirEngineImpl.kt b/engine/src/main/java/com/google/android/fhir/impl/FhirEngineImpl.kt index 56cbfe2405..d7b4c8d0e8 100644 --- a/engine/src/main/java/com/google/android/fhir/impl/FhirEngineImpl.kt +++ b/engine/src/main/java/com/google/android/fhir/impl/FhirEngineImpl.kt @@ -44,10 +44,6 @@ internal class FhirEngineImpl(private val database: Database, private val contex return database.insert(*resource) } - override suspend fun createRemote(vararg resource: Resource) { - return database.insertRemote(*resource) - } - override suspend fun get(type: ResourceType, id: String): Resource { return database.select(type, id) } diff --git a/engine/src/main/java/com/google/android/fhir/testing/Utilities.kt b/engine/src/main/java/com/google/android/fhir/testing/Utilities.kt index cd3505cd5e..2169a75543 100644 --- a/engine/src/main/java/com/google/android/fhir/testing/Utilities.kt +++ b/engine/src/main/java/com/google/android/fhir/testing/Utilities.kt @@ -134,9 +134,6 @@ open class TestDownloadManagerImpl( object TestFhirEngineImpl : FhirEngine { override suspend fun create(vararg resource: Resource) = emptyList() - override suspend fun createRemote(vararg resource: Resource) { - TODO("Not yet implemented") - } override suspend fun update(vararg resource: Resource) {}