Class ResourceResult.Builder<T extends Resource>
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.ResourceResult.Builder<T>
-
- Enclosing class:
- ResourceResult<T extends Resource>
public static class ResourceResult.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 ResourceResult<T>build()Build theSingleResourceResultResourceResult.Builder<T>deleted(boolean flag)Whether or not the resource is deletedResourceResult.Builder<T>lastUpdated(java.time.Instant lastUpdated)The lastUpdated time of the resourceResourceResult.Builder<T>logicalId(java.lang.String logicalId)Sets the logicalId of the resource which should be set when the resource value itself is nullResourceResult.Builder<T>resource(T resource)The resulting resource from the interactionResourceResult.Builder<T>resourceTypeName(java.lang.String resourceTypeName)The type name of the resource which should be set when the resource value itself is nullResourceResult.Builder<T>version(int version)Sets the version of the resource which should be set when the resource value itself is null
-
-
-
Method Detail
-
deleted
public ResourceResult.Builder<T> deleted(boolean flag)
Whether or not the resource is deleted- Parameters:
flag-- Returns:
- A reference to this Builder instance
-
resource
public ResourceResult.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 ResourceResult.Builder<T> lastUpdated(java.time.Instant lastUpdated)
The lastUpdated time of the resource- Parameters:
lastUpdated- the lastUpdated timestamp representing the UTC modification time of the resource- Returns:
- A reference to this Builder instance
-
resourceTypeName
public ResourceResult.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 ResourceResult.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 ResourceResult.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 ResourceResult<T> build()
- Returns:
- An immutable object of type
SingleResourceResult
-
-