Class FHIRPersistenceContextFactory
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.context.FHIRPersistenceContextFactory
-
public class FHIRPersistenceContextFactory extends java.lang.Object
This is a factory used to create instances of the FHIRPersistenceContext interface.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FHIRHistoryContext
createHistoryContext()
Returns a FHIRHistoryContext instance with default values.static FHIRPersistenceContext
createPersistenceContext(FHIRPersistenceEvent event)
Returns a FHIRPersistenceContext that contains a FHIRPersistenceEvent instance.static FHIRPersistenceContext
createPersistenceContext(FHIRPersistenceEvent event, java.lang.Integer ifNoneMatch)
Returns a FHIRPersistenceContext that contains a FHIRPersistenceEvent instance.static FHIRPersistenceContext
createPersistenceContext(FHIRPersistenceEvent event, FHIRHistoryContext historyContext)
Returns a FHIRPersistenceContext that contains a FHIRPersistenceEvent and a FHIRHistoryContext.static FHIRPersistenceContext
createPersistenceContext(FHIRPersistenceEvent event, FHIRSearchContext searchContext, java.lang.String requestShard)
Returns a FHIRPersistenceContext that contains a FHIRPersistenceEvent and a FHIRSearchContext.
-
-
-
Method Detail
-
createPersistenceContext
public static FHIRPersistenceContext createPersistenceContext(FHIRPersistenceEvent event)
Returns a FHIRPersistenceContext that contains a FHIRPersistenceEvent instance.- Parameters:
event
- the FHIRPersistenceEvent instance to be contained in the FHIRPersistenceContext instance
-
createPersistenceContext
public static FHIRPersistenceContext createPersistenceContext(FHIRPersistenceEvent event, java.lang.Integer ifNoneMatch)
Returns a FHIRPersistenceContext that contains a FHIRPersistenceEvent instance.- Parameters:
event
- the FHIRPersistenceEvent instance to be contained in the FHIRPersistenceContext instanceifNoneMatch
- flag to tell the persistence layer to apply conditional create-on-update logic.
-
createPersistenceContext
public static FHIRPersistenceContext createPersistenceContext(FHIRPersistenceEvent event, FHIRHistoryContext historyContext)
Returns a FHIRPersistenceContext that contains a FHIRPersistenceEvent and a FHIRHistoryContext.- Parameters:
event
- the FHIRPersistenceEvent instance to be contained in the FHIRPersistenceContext instancehistoryContext
- the FHIRHistoryContext instance to be contained in the FHIRPersistenceContext instance
-
createPersistenceContext
public static FHIRPersistenceContext createPersistenceContext(FHIRPersistenceEvent event, FHIRSearchContext searchContext, java.lang.String requestShard)
Returns a FHIRPersistenceContext that contains a FHIRPersistenceEvent and a FHIRSearchContext.- Parameters:
event
- the FHIRPersistenceEvent instance to be contained in the FHIRPersistenceContext instancesearchContext
- the FHIRSearchContext instance to be contained in the FHIRPersistenceContext instancerequestShard
- the requested shard; can be null
-
createHistoryContext
public static FHIRHistoryContext createHistoryContext()
Returns a FHIRHistoryContext instance with default values.
-
-