Class MultiResourceResult.Builder<T extends Resource>

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • success

        public MultiResourceResult.Builder<T> success​(boolean success)
        Whether or not the interaction was successful

        This 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 interaction

        Adds 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 interaction

        Replaces 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 interaction

        This field is required when the interaction is not successful

        Parameters:
        outcome - the outcome of the interaction
        Returns:
        A reference to this Builder instance