Package com.ibm.fhir.persistence
Class MultiResourceResult.Builder<T extends Resource>
- java.lang.Object
 - 
- com.ibm.fhir.persistence.MultiResourceResult.Builder<T>
 
 
- 
- Enclosing class:
 - MultiResourceResult<T extends Resource>
 
public static class MultiResourceResult.Builder<T extends Resource> extends Object
 
- 
- 
Constructor Summary
Constructors Constructor Description Builder() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiResourceResult<T>build()Build theMultiResourceResultMultiResourceResult.Builder<T>outcome(OperationOutcome outcome)An OperationOutcome that represents the outcome of the interactionMultiResourceResult.Builder<T>resource(Collection<T> resource)The return resources from the interactionMultiResourceResult.Builder<T>resource(T... resource)The return resources from the interactionMultiResourceResult.Builder<T>success(boolean success)Whether or not the interaction was successful 
 - 
 
- 
- 
Field Detail
- 
success
boolean success
 
- 
outcome
OperationOutcome outcome
 
 - 
 
- 
Method Detail
- 
success
public MultiResourceResult.Builder<T> 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
 
 
- 
resource
@SafeVarargs public final MultiResourceResult.Builder<T> resource(T... resource)
The return resources from the interactionAdds new element(s) to the existing list
- Parameters:
 resource- the resources to return from the interaction; this may be empty if there are no results- Returns:
 - A reference to this Builder instance
 
 
- 
resource
public MultiResourceResult.Builder<T> resource(Collection<T> resource)
The return resources from the interactionReplaces the existing list with a new one containing elements from the Collection
- Parameters:
 resource- the resources to return from the interaction; this may be empty if there are no results- Returns:
 - A reference to this Builder instance
 
 
- 
outcome
public MultiResourceResult.Builder<T> 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<T> build()
- Returns:
 - An immutable object of type 
MultiResourceResult 
 
 - 
 
 -