Package com.ibm.fhir.persistence.payload
Class PayloadPersistenceHelper
- java.lang.Object
 - 
- com.ibm.fhir.persistence.payload.PayloadPersistenceHelper
 
 
- 
public class PayloadPersistenceHelper extends Object
Collection of helper methods related to the persistence of FHIR resource payload data 
- 
- 
Constructor Summary
Constructors Constructor Description PayloadPersistenceHelper() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InstantgetCurrentInstant()Get the current time which can be used for the lastUpdated fieldstatic <T extends Resource>
Tparse(Class<T> resourceType, InputStream in, List<String> elements)Parse the given stream, using elements if neededstatic InputOutputByteStreamrender(Resource resource, boolean compress)Render the payload 
 - 
 
- 
- 
Method Detail
- 
render
public static InputOutputByteStream render(Resource resource, boolean compress) throws FHIRPersistenceException
Render the payload- Parameters:
 resource-compress-- Returns:
 - Throws:
 FHIRPersistenceException
 
- 
parse
public static <T extends Resource> T parse(Class<T> resourceType, InputStream in, List<String> elements)
Parse the given stream, using elements if needed- Type Parameters:
 T-- Parameters:
 resourceType-in-elements-- Returns:
 
 
- 
getCurrentInstant
public static Instant getCurrentInstant()
Get the current time which can be used for the lastUpdated field- Returns:
 - current time in UTC
 
 
 - 
 
 -