Class SingleResourceResult.Builder<T extends Resource>
- java.lang.Object
 - 
- org.linuxforhealth.fhir.persistence.SingleResourceResult.Builder<T>
 
 
- 
- Enclosing class:
 - SingleResourceResult<T extends Resource>
 
public static class SingleResourceResult.Builder<T extends Resource> extends java.lang.Object 
- 
- 
Constructor Summary
Constructors Constructor Description Builder() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SingleResourceResult<T>build()Build theSingleResourceResultSingleResourceResult.Builder<T>deleted(boolean flag)Whether or not the resource is deletedSingleResourceResult.Builder<T>ifNoneMatchVersion(java.lang.Integer versionId)Sets the version we found hitting IfNoneMatch.SingleResourceResult.Builder<T>interactionStatus(InteractionStatus interactionStatus)Sets the interaction statusSingleResourceResult.Builder<T>lastUpdated(java.time.Instant lastUpdated)The lastUpdated time read from the database.SingleResourceResult.Builder<T>logicalId(java.lang.String logicalId)Sets the logicalId of the resource which should be set when the resource value itself is nullSingleResourceResult.Builder<T>outcome(OperationOutcome outcome)An OperationOutcome that represents the outcome of the interactionSingleResourceResult.Builder<T>resource(T resource)The resulting resource from the interactionSingleResourceResult.Builder<T>resourceTypeName(java.lang.String resourceTypeName)The type name of the resource which should be set when the resource value itself is nullSingleResourceResult.Builder<T>success(boolean success)Whether or not the interaction was successfulSingleResourceResult.Builder<T>version(int version)Sets the version of the resource which should be set when the resource value itself is null 
 - 
 
- 
- 
Method Detail
- 
success
public SingleResourceResult.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
 
 
- 
interactionStatus
public SingleResourceResult.Builder<T> interactionStatus(InteractionStatus interactionStatus)
Sets the interaction status- Parameters:
 status-- Returns:
 - a reference to this Builder instance
 
 
- 
ifNoneMatchVersion
public SingleResourceResult.Builder<T> ifNoneMatchVersion(java.lang.Integer versionId)
Sets the version we found hitting IfNoneMatch. Null in other cases.- Parameters:
 versionId-- Returns:
 
 
- 
deleted
public SingleResourceResult.Builder<T> deleted(boolean flag)
Whether or not the resource is deleted- Parameters:
 flag-- Returns:
 - A reference to this Builder instance
 
 
- 
resource
public SingleResourceResult.Builder<T> resource(T resource)
The resulting resource from the interaction- Parameters:
 resource- the resulting resource from the interaction; this may be null if the interaction was not successful- Returns:
 - A reference to this Builder instance
 
 
- 
lastUpdated
public SingleResourceResult.Builder<T> lastUpdated(java.time.Instant lastUpdated)
The lastUpdated time read from the database.- Parameters:
 lastUpdated-- Returns:
 
 
- 
outcome
public SingleResourceResult.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
 
 
- 
resourceTypeName
public SingleResourceResult.Builder<T> resourceTypeName(java.lang.String resourceTypeName)
The type name of the resource which should be set when the resource value itself is null- Parameters:
 resourceTypeName- The type name of the resource this result represents- Returns:
 - A reference to this Builder instance
 
 
- 
logicalId
public SingleResourceResult.Builder<T> logicalId(java.lang.String logicalId)
Sets the logicalId of the resource which should be set when the resource value itself is null- Parameters:
 logicalId- The logicalId of this resource- Returns:
 - A reference to this Builder instance
 
 
- 
version
public SingleResourceResult.Builder<T> version(int version)
Sets the version of the resource which should be set when the resource value itself is null- Parameters:
 version- The version of this resource- Returns:
 - A reference to this Builder instance
 
 
- 
build
public SingleResourceResult<T> build()
- Returns:
 - An immutable object of type 
SingleResourceResult 
 
 - 
 
 -