Class MultiResourceResult.Builder
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.MultiResourceResult.Builder
-
- Enclosing class:
- MultiResourceResult
public static class MultiResourceResult.Builder extends java.lang.Object
-
-
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
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiResourceResult.Builder
addResourceResults(java.util.List<ResourceResult<? extends Resource>> resourceResultsList)
Add the resource result list to resource list owned by thisMultiResourceResult
build()
Build theMultiResourceResult
MultiResourceResult.Builder
expectedNextId(java.lang.Long expectedNextId)
Build the expected resource Id of the first resource in the next page of search results.MultiResourceResult.Builder
expectedPreviousId(java.lang.Long expectedPreviousId)
Build the expected resource Id of the last resource in the previous page of search results.MultiResourceResult.Builder
firstId(java.lang.Long firstId)
Set an id that corresponds to the first entry of the current page of results.MultiResourceResult.Builder
lastId(java.lang.Long lastId)
Set an id that corresponds to the last entry of the current page of results.MultiResourceResult.Builder
outcome(OperationOutcome outcome)
An OperationOutcome that represents the outcome of the interactionMultiResourceResult.Builder
resourceResult(ResourceResult<? extends Resource>... resourceResultsParam)
Add the resource results to the resourceResults listMultiResourceResult.Builder
success(boolean success)
Whether or not the interaction was successful
-
-
-
Field Detail
-
success
boolean success
-
resourceResults
final java.util.List<ResourceResult<? extends Resource>> resourceResults
-
outcome
OperationOutcome outcome
-
expectedNextId
java.lang.Long expectedNextId
-
expectedPreviousId
java.lang.Long expectedPreviousId
-
firstId
java.lang.Long firstId
-
lastId
java.lang.Long lastId
-
-
Method Detail
-
success
public MultiResourceResult.Builder success(boolean success)
Whether or not the interaction was successfulThis field is required.
- Parameters:
success
- whether the interaction was successful- Returns:
- A reference to this Builder instance
-
resourceResult
@SafeVarargs public final MultiResourceResult.Builder resourceResult(ResourceResult<? extends Resource>... resourceResultsParam)
Add the resource results to the resourceResults list- Parameters:
resourceResultsParam
-- Returns:
-
addResourceResults
public final MultiResourceResult.Builder addResourceResults(java.util.List<ResourceResult<? extends Resource>> resourceResultsList)
Add the resource result list to resource list owned by this- Parameters:
resourceResultsParam
-- Returns:
-
outcome
public MultiResourceResult.Builder outcome(OperationOutcome outcome)
An OperationOutcome that represents the outcome of the interactionThis field is required when the interaction is not successful
- Parameters:
outcome
- the outcome of the interaction- Returns:
- A reference to this Builder instance
-
build
public MultiResourceResult build()
- Returns:
- An immutable object of type
MultiResourceResult
-
expectedNextId
public MultiResourceResult.Builder expectedNextId(java.lang.Long expectedNextId)
Build the expected resource Id of the first resource in the next page of search results.- Parameters:
expectedNextId
-- Returns:
- A reference to this Builder instance
-
expectedPreviousId
public MultiResourceResult.Builder expectedPreviousId(java.lang.Long expectedPreviousId)
Build the expected resource Id of the last resource in the previous page of search results.- Parameters:
expectedPreviousId
-- Returns:
- A reference to this Builder instance
-
firstId
public MultiResourceResult.Builder firstId(java.lang.Long firstId)
Set an id that corresponds to the first entry of the current page of results.- Parameters:
firstId
-- Returns:
- A reference to this Builder instance
-
lastId
public MultiResourceResult.Builder lastId(java.lang.Long lastId)
Set an id that corresponds to the last entry of the current page of results.- Parameters:
lastId
-- Returns:
- A reference to this Builder instance
-
-