Class MultiResourceResult
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.MultiResourceResult
-
public class MultiResourceResult extends java.lang.Object
A Result wrapper for FHIR interactions that can return multiple resources. Instances are immutable and can be constructed vianew MultiResourceResult.Builder<T>()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MultiResourceResult.Builder
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.Long
expectedNextId
(package private) java.lang.Long
expectedPreviousId
(package private) java.lang.Long
firstId
(package private) java.lang.Long
lastId
(package private) OperationOutcome
outcome
(package private) java.util.List<ResourceResult<? extends Resource>>
resourceResults
(package private) boolean
success
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MultiResourceResult.Builder
builder()
java.lang.Long
geFirstId()
Get the id of the first entry in the current page.java.lang.Long
getExpectedNextId()
Get the expected id of the first entry in the next page.java.lang.Long
getExpectedPreviousId()
Get the expected id of the last entry in the previous page.java.lang.Long
getLastId()
Get the id of the last entry in the current page.OperationOutcome
getOutcome()
An OperationOutcome that represents the outcome of the interactionjava.util.List<ResourceResult<? extends Resource>>
getResourceResults()
The resource results returned from the interactionboolean
isSuccess()
Whether or not the interaction was successful
-
-
-
Field Detail
-
success
final boolean success
-
resourceResults
final java.util.List<ResourceResult<? extends Resource>> resourceResults
-
outcome
final OperationOutcome outcome
-
expectedNextId
final java.lang.Long expectedNextId
-
expectedPreviousId
final java.lang.Long expectedPreviousId
-
firstId
final java.lang.Long firstId
-
lastId
final java.lang.Long lastId
-
-
Method Detail
-
isSuccess
public boolean isSuccess()
Whether or not the interaction was successful- Returns:
- whether the interaction was successful
-
getResourceResults
public java.util.List<ResourceResult<? extends Resource>> getResourceResults()
The resource results returned from the interaction- Returns:
- An unmodifiable list containing immutable objects of type
ResourceResult
-
getOutcome
public OperationOutcome getOutcome()
An OperationOutcome that represents the outcome of the interaction- Returns:
- An immutable object of type
OperationOutcome
-
builder
public static MultiResourceResult.Builder builder()
-
getExpectedNextId
public java.lang.Long getExpectedNextId()
Get the expected id of the first entry in the next page.- Returns:
- An id that uniquely identifies a particular version of a particular resource type with a particular logical id.
-
getExpectedPreviousId
public java.lang.Long getExpectedPreviousId()
Get the expected id of the last entry in the previous page.- Returns:
- An id that uniquely identifies a particular version of a particular resource type with a particular logical id.
-
geFirstId
public java.lang.Long geFirstId()
Get the id of the first entry in the current page.- Returns:
- An id that uniquely identifies a particular version of a particular resource type with a particular logical id.
-
getLastId
public java.lang.Long getLastId()
Get the id of the last entry in the current page.- Returns:
- An id that uniquely identifies a particular version of a particular resource type with a particular logical id.
-
-