Class ImmutableItemSearchRequest

  • All Implemented Interfaces:
    ItemSearchRequest

    public class ImmutableItemSearchRequest
    extends java.lang.Object
    implements ItemSearchRequest
    Immutable value object for representing a search request
    • Method Detail

      • getPaginationParameters

        public java.util.Optional<PaginationParameters> getPaginationParameters()
        Description copied from interface: ItemSearchRequest
        Retrieves pagination specification associated with the item search. If the pagination parameters are present, then items should be retrieved in the page (batch) mode according to that specification. Otherwise, all items should be retrieved.
        Specified by:
        getPaginationParameters in interface ItemSearchRequest
        Returns:
        an Optional containing the PaginationParameters, if pagination was specified for this item lookup, or an Optional.empty() otherwise.
      • getTypeDescriptor

        @NotNull
        public @NotNull TypeDescriptor getTypeDescriptor()
        Description copied from interface: ItemSearchRequest
        Specifies the metadata describing the requested item type.
        Specified by:
        getTypeDescriptor in interface ItemSearchRequest
        Returns:
        descriptor of an item type within the context integration object, for which data are being requested.
      • getRequestedItem

        public java.util.Optional<IntegrationItem> getRequestedItem()
        Description copied from interface: ItemSearchRequest
        Retrieves integration item that contains key attributes of the item to be found.
        Specified by:
        getRequestedItem in interface ItemSearchRequest
        Returns:
        a search key represented as an item. If search should be done by an item key, then IntegrationItem containing the key attributes values must be present in this request. However, when search should result in multiple items found, then this method returns Optional.empty().
      • getOrderBy

        public java.util.List<OrderExpression> getOrderBy()
        Description copied from interface: ItemSearchRequest
        Specifies conditions the items to retrieve should be ordered by
        Specified by:
        getOrderBy in interface ItemSearchRequest
        Returns:
        order by expression list List<OrderExpression>
      • getAcceptLocale

        public java.util.Locale getAcceptLocale()
        Description copied from interface: ItemSearchRequest
        Get accepted locale extracted from the "Accept-Language" header locale associated with the request.
        Specified by:
        getAcceptLocale in interface ItemSearchRequest
        Returns:
        accepted locale Locale
      • includeTotalCount

        public boolean includeTotalCount()
        Description copied from interface: ItemSearchRequest
        Specifies whether total number of items matching this request should be included in the response or not.
        Specified by:
        includeTotalCount in interface ItemSearchRequest
        Returns:
        true, if the search result must include total number of matching items; false, if the search result needs to contain item(s) only and does not need total count. Keep in mind that requesting total count to be included in the search result may incur performance penalty.
      • isCountOnly

        public boolean isCountOnly()
        Description copied from interface: ItemSearchRequest
        Specifies whether the search response should include number of matching items only.
        Specified by:
        isCountOnly in interface ItemSearchRequest
        Returns:
        true, if the search result should contain only count of the matching items but no matching items themselves; false, if the items must be included. Note, true result of this call implies that includeTotalCount() also returns true.