implement function for all concrete classe
@@ -13,7 +13,6 @@ import ca.uhn.fhir.jpa.dao.SearchBuilder;
import ca.uhn.fhir.jpa.dao.SearchBuilderFactory;
import ca.uhn.fhir.jpa.entity.Search;
import ca.uhn.fhir.jpa.entity.SearchTypeEnum;
-import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
import ca.uhn.fhir.jpa.model.search.SearchStatusEnum;
import ca.uhn.fhir.jpa.partition.IRequestPartitionHelperSvc;
import ca.uhn.fhir.jpa.search.cache.ISearchCacheSvc;
@@ -24,12 +23,11 @@ import ca.uhn.fhir.model.dstu2.resource.Patient;
import ca.uhn.fhir.rest.api.CacheControlDirective;
import ca.uhn.fhir.rest.api.server.IBundleProvider;
import ca.uhn.fhir.rest.api.server.RequestDetails;
+import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
import ca.uhn.fhir.rest.param.StringParam;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException;
-import ca.uhn.fhir.util.TestUtil;
import org.hl7.fhir.instance.model.api.IBaseResource;
-import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -668,6 +666,15 @@ public class SearchCoordinatorSvcImplTest {
return myCount;
}
+ @Override
+ public Collection<ResourcePersistentId> getNextResultBatch(long theBatchSize) {
+ Collection<ResourcePersistentId> batch = new ArrayList<>();
+ while (this.hasNext() && batch.size() < theBatchSize) {
+ batch.add(this.next());
+ }
+ return batch;
+ }
+
@Override
public void close() {
// nothing
@@ -704,6 +711,15 @@ public class SearchCoordinatorSvcImplTest {
return myCount;
}
+ @Override
+ public Collection<ResourcePersistentId> getNextResultBatch(long theBatchSize) {
+ Collection<ResourcePersistentId> batch = new ArrayList<>();
+ while (this.hasNext() && batch.size() < theBatchSize) {
+ batch.add(this.next());
+ }
+ return batch;
+ }
+
@Override
public void close() {
// nothing
@@ -775,6 +791,15 @@ public class SearchCoordinatorSvcImplTest {
return 0;
}
+ @Override
+ public Collection<ResourcePersistentId> getNextResultBatch(long theBatchSize) {
+ Collection<ResourcePersistentId> batch = new ArrayList<>();
+ while (this.hasNext() && batch.size() < theBatchSize) {
+ batch.add(this.next());
+ }
+ return batch;
+ }
+
@Override
public void close() {
// nothing
