Class ChunkWriter
- java.lang.Object
-
- javax.batch.api.chunk.AbstractItemWriter
-
- org.linuxforhealth.fhir.bulkdata.jbatch.load.ChunkWriter
-
- All Implemented Interfaces:
javax.batch.api.chunk.ItemWriter
@Dependent public class ChunkWriter extends javax.batch.api.chunk.AbstractItemWriter
BulkData $import ChunkWriter
-
-
Constructor Summary
Constructors Constructor Description ChunkWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OperationOutcome
conditionalFingerprintUpdate(ImportTransientUserData chunkData, boolean skip, FHIRPersistence persistence, FHIRPersistenceContext context, java.lang.String logicalId, Resource resource, BulkDataContext ctx, long line)
conditional update checks to see if our cache contains the key, if not reads from the db, and calculates the cache.void
open(java.io.Serializable checkpoint)
void
writeItems(java.util.List<java.lang.Object> arg0)
-
-
-
Method Detail
-
open
public void open(java.io.Serializable checkpoint) throws java.lang.Exception
- Specified by:
open
in interfacejavax.batch.api.chunk.ItemWriter
- Overrides:
open
in classjavax.batch.api.chunk.AbstractItemWriter
- Throws:
java.lang.Exception
-
writeItems
public void writeItems(java.util.List<java.lang.Object> arg0) throws java.lang.Exception
- Specified by:
writeItems
in interfacejavax.batch.api.chunk.ItemWriter
- Specified by:
writeItems
in classjavax.batch.api.chunk.AbstractItemWriter
- Throws:
java.lang.Exception
-
conditionalFingerprintUpdate
public OperationOutcome conditionalFingerprintUpdate(ImportTransientUserData chunkData, boolean skip, FHIRPersistence persistence, FHIRPersistenceContext context, java.lang.String logicalId, Resource resource, BulkDataContext ctx, long line) throws java.lang.Exception
conditional update checks to see if our cache contains the key, if not reads from the db, and calculates the cache. The cache is saved within the context of this particular execution, and then destroyed.- Parameters:
chunkData
- the transient user data used increment the number of skipsskip
- should skip the resource if it matchespersistence
- used to facilitate the calls to the underlying dbcontext
- used in db callslogicalId
- the logical id of the FHIR resource (e.g. 1-2-3-4)resource
- the FHIR Resourcectx
- the bulk data contextline
- the line number- Returns:
- outcomes including information or warnings
- Throws:
java.lang.Exception
-
-