Class FetchResourcePayloadsDAO
- java.lang.Object
 - 
- com.ibm.fhir.persistence.jdbc.dao.impl.FetchResourcePayloadsDAO
 
 
- 
public class FetchResourcePayloadsDAO extends 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, String schemaName, String resourceType, Instant fromLastUpdated, Instant toLastUpdated, Function<ResourcePayload,Boolean> processor) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcount(Connection c)Get a count of the resources matching the filter predicates...for debugging...slows things down a lotResourcePayloadrun(Connection c)Run the query, feeding each result row to the consumer 
 - 
 
- 
- 
Constructor Detail
- 
FetchResourcePayloadsDAO
public FetchResourcePayloadsDAO(IDatabaseTranslator translator, String schemaName, String resourceType, Instant fromLastUpdated, Instant toLastUpdated, Function<ResourcePayload,Boolean> processor)
 
 - 
 
- 
Method Detail
- 
run
public ResourcePayload run(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(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
 
 - 
 
 -