Class FHIRPersistenceContextImpl
- java.lang.Object
-
- com.ibm.fhir.persistence.context.impl.FHIRPersistenceContextImpl
-
- All Implemented Interfaces:
FHIRPersistenceContext
public class FHIRPersistenceContextImpl extends Object implements FHIRPersistenceContext
This class provides a concrete implementation of the FHIRPersistenceContext interface and is used to pass request context-related information to the persistence layer.
-
-
Constructor Summary
Constructors Constructor Description FHIRPersistenceContextImpl(FHIRPersistenceEvent pe)FHIRPersistenceContextImpl(FHIRPersistenceEvent pe, boolean includeDeleted)FHIRPersistenceContextImpl(FHIRPersistenceEvent pe, boolean includeDeleted, FHIRSearchContext sc)FHIRPersistenceContextImpl(FHIRPersistenceEvent pe, FHIRHistoryContext hc)FHIRPersistenceContextImpl(FHIRPersistenceEvent pe, FHIRSearchContext sc)FHIRPersistenceContextImpl(FHIRPersistenceEvent pe, Integer ifNoneMatch)Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FHIRHistoryContextgetHistoryContext()Returns the FHIRHistoryContext instance associated with the current request.IntegergetIfNoneMatch()Get the encoded ifNoneMatch value which is interpreted as follows:FHIRPersistenceEventgetPersistenceEvent()Returns the FHIRPersistenceEvent instance for the current request.FHIRSearchContextgetSearchContext()Returns the FHIRSearchContext instance associated with the current request.booleanincludeDeleted()Indicates whether the persistence layer should include "deleted" resources in the operation response.voidsetIfNoneMatch(Integer ifNoneMatch)Setter for the If-None-Match header valuevoidsetIncludeDeleted(boolean includeDeleted)Setter for the includeDeleted flag
-
-
-
Constructor Detail
-
FHIRPersistenceContextImpl
public FHIRPersistenceContextImpl(FHIRPersistenceEvent pe)
-
FHIRPersistenceContextImpl
public FHIRPersistenceContextImpl(FHIRPersistenceEvent pe, boolean includeDeleted)
-
FHIRPersistenceContextImpl
public FHIRPersistenceContextImpl(FHIRPersistenceEvent pe, Integer ifNoneMatch)
Public constructor- Parameters:
pe-ifNoneMatch-
-
FHIRPersistenceContextImpl
public FHIRPersistenceContextImpl(FHIRPersistenceEvent pe, FHIRHistoryContext hc)
-
FHIRPersistenceContextImpl
public FHIRPersistenceContextImpl(FHIRPersistenceEvent pe, FHIRSearchContext sc)
-
FHIRPersistenceContextImpl
public FHIRPersistenceContextImpl(FHIRPersistenceEvent pe, boolean includeDeleted, FHIRSearchContext sc)
-
-
Method Detail
-
getPersistenceEvent
public FHIRPersistenceEvent getPersistenceEvent()
Description copied from interface:FHIRPersistenceContextReturns the FHIRPersistenceEvent instance for the current request. This contains information about the security context, HTTP headers, request URI information, etc.- Specified by:
getPersistenceEventin interfaceFHIRPersistenceContext
-
getHistoryContext
public FHIRHistoryContext getHistoryContext()
Description copied from interface:FHIRPersistenceContextReturns the FHIRHistoryContext instance associated with the current request. This will be null if the current request is not a 'history' operation.- Specified by:
getHistoryContextin interfaceFHIRPersistenceContext
-
getSearchContext
public FHIRSearchContext getSearchContext()
Description copied from interface:FHIRPersistenceContextReturns the FHIRSearchContext instance associated with the current request. This will be null if the current request is not a 'search' operation.- Specified by:
getSearchContextin interfaceFHIRPersistenceContext
-
includeDeleted
public boolean includeDeleted()
Description copied from interface:FHIRPersistenceContextIndicates whether the persistence layer should include "deleted" resources in the operation response.- Specified by:
includeDeletedin interfaceFHIRPersistenceContext
-
setIncludeDeleted
public void setIncludeDeleted(boolean includeDeleted)
Setter for the includeDeleted flag- Parameters:
includeDeleted-
-
setIfNoneMatch
public void setIfNoneMatch(Integer ifNoneMatch)
Setter for the If-None-Match header value- Parameters:
ifNoneMatch-
-
getIfNoneMatch
public Integer getIfNoneMatch()
Description copied from interface:FHIRPersistenceContextGet the encoded ifNoneMatch value which is interpreted as follows:null: create-on-update proceeds as normal 0: create-on-update returns 304 if resource exists, 201 if created- Specified by:
getIfNoneMatchin interfaceFHIRPersistenceContext- Returns:
- the value from the If-None-Match header in the PUT request
-
-