Package com.ibm.fhir.persistence
Class ResourcePayload
- java.lang.Object
-
- com.ibm.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 Summary
Constructors Constructor Description ResourcePayload(java.lang.String logicalId, java.time.Instant lastUpdated, long resourceId, java.io.InputStream decompressedPayload)
-
Method Summary
All 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
-
ResourcePayload
public 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 resourcelastUpdated- the non-null lastUpdated time for this resourceresourceId- the non-null row identifier from the x_resources table for this resourcedecompressedPayload- a non-null InputStream with the contents of a given resource in JSON format
-
-
Method Detail
-
getLogicalId
public java.lang.String getLogicalId()
Getter for the logicalId of this resource- Returns:
-
getResourceId
public long getResourceId()
Getter for the resourceId- Returns:
-
transferTo
public 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
-
getLastUpdated
public java.time.Instant getLastUpdated()
- Returns:
- the lastUpdated
-
-