Class MultiResourceResult
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.MultiResourceResult
-
public class MultiResourceResult extends java.lang.ObjectA 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 classMultiResourceResult.Builder
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.LongexpectedNextId(package private) java.lang.LongexpectedPreviousId(package private) java.lang.LongfirstId(package private) java.lang.LonglastId(package private) OperationOutcomeoutcome(package private) java.util.List<ResourceResult<? extends Resource>>resourceResults(package private) booleansuccess
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MultiResourceResult.Builderbuilder()java.lang.LonggeFirstId()Get the id of the first entry in the current page.java.lang.LonggetExpectedNextId()Get the expected id of the first entry in the next page.java.lang.LonggetExpectedPreviousId()Get the expected id of the last entry in the previous page.java.lang.LonggetLastId()Get the id of the last entry in the current page.OperationOutcomegetOutcome()An OperationOutcome that represents the outcome of the interactionjava.util.List<ResourceResult<? extends Resource>>getResourceResults()The resource results returned from the interactionbooleanisSuccess()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.
-
-