Class FetchResourcePayloadsDAO
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.jdbc.dao.impl.FetchResourcePayloadsDAO
-
public class FetchResourcePayloadsDAO extends java.lang.Object
DAO to fetch resource ids using a time range and optional current resource id as a filter. Useful for scanning the database for new resources since a given timestamp (for example in export scenarios).
-
-
Constructor Summary
Constructors Constructor Description FetchResourcePayloadsDAO(IDatabaseTranslator translator, java.lang.String schemaName, java.lang.String resourceType, java.time.Instant fromLastUpdated, java.time.Instant toLastUpdated, java.util.function.Function<ResourcePayload,java.lang.Boolean> processor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
count(java.sql.Connection c)
Get a count of the resources matching the filter predicates...for debugging...slows things down a lotResourcePayload
run(java.sql.Connection c)
Run the query, feeding each result row to the consumer
-
-
-
Constructor Detail
-
FetchResourcePayloadsDAO
public FetchResourcePayloadsDAO(IDatabaseTranslator translator, java.lang.String schemaName, java.lang.String resourceType, java.time.Instant fromLastUpdated, java.time.Instant toLastUpdated, java.util.function.Function<ResourcePayload,java.lang.Boolean> processor)
-
-
Method Detail
-
run
public ResourcePayload run(java.sql.Connection c) throws FHIRPersistenceException
Run the query, feeding each result row to the consumer- Parameters:
c
-- Returns:
- the last record processed
- Throws:
FHIRPersistenceException
-
count
public int count(java.sql.Connection c) throws FHIRPersistenceException
Get a count of the resources matching the filter predicates...for debugging...slows things down a lot- Parameters:
c
-- Returns:
- Throws:
FHIRPersistenceException
-
-