Class MultiResourceResult.Builder

  • Enclosing class:
    MultiResourceResult

    public static class MultiResourceResult.Builder
    extends java.lang.Object
    • Field Detail

      • success

        boolean success
      • expectedNextId

        java.lang.Long expectedNextId
      • expectedPreviousId

        java.lang.Long expectedPreviousId
      • firstId

        java.lang.Long firstId
      • lastId

        java.lang.Long lastId
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • success

        public MultiResourceResult.Builder 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
      • 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 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
      • 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