Class ResourcePayload
- java.lang.Object
- 
- org.linuxforhealth.fhir.persistence.ResourcePayload
 
- 
 public class ResourcePayload extends java.lang.ObjectData carrier used by the Consumer to send back streaming payload result data to a caller
- 
- 
Constructor SummaryConstructors Constructor Description ResourcePayload(java.lang.String logicalId, java.time.Instant lastUpdated, long resourceId, java.io.InputStream decompressedPayload)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.time.InstantgetLastUpdated()java.lang.StringgetLogicalId()Getter for the logicalId of this resourcelonggetResourceId()Getter for the resourceIdlongtransferTo(java.io.OutputStream os)Copy the contents of the payload stream into the givenOutputStream
 
- 
- 
- 
Constructor Detail- 
ResourcePayloadpublic ResourcePayload(java.lang.String logicalId, java.time.Instant lastUpdated, long resourceId, java.io.InputStream decompressedPayload)- Parameters:
- logicalId- the non-null row identifier from the logical_resources table for this resource
- lastUpdated- the non-null lastUpdated time for this resource
- resourceId- the non-null row identifier from the x_resources table for this resource
- decompressedPayload- a non-null InputStream with the contents of a given resource in JSON format
 
 
- 
 - 
Method Detail- 
getLogicalIdpublic java.lang.String getLogicalId() Getter for the logicalId of this resource- Returns:
 
 - 
getResourceIdpublic long getResourceId() Getter for the resourceId- Returns:
 
 - 
transferTopublic long transferTo(java.io.OutputStream os) throws java.io.IOExceptionCopy the contents of the payload stream into the givenOutputStream- Parameters:
- os- the OutputStream to transfer the bytes into
- Returns:
- the number of bytes transferred into the OutputStream
- Throws:
- java.io.IOException
 
 - 
getLastUpdatedpublic java.time.Instant getLastUpdated() - Returns:
- the lastUpdated
 
 
- 
 
-