Class SelectOneStepSupplier<R,​ID,​T extends org.springframework.data.repository.Repository<R,​ID>>

    • Constructor Detail

      • SelectOneStepSupplier

        protected SelectOneStepSupplier​(T repository,
                                        Function<T,​R> select)
    • Method Detail

      • thenGetObject

        public <S> GetObjectFromEntity<S,​R> thenGetObject​(Function<R,​S> f)
        Creates a step that returns an object calculated or taken from selected entity-object
        Type Parameters:
        S - is a type of desired result
        Parameters:
        f - describes how to get desired data from the entity-object
        Returns:
        step that returns an object after execution.
      • thenGetList

        public <ITEM,​S extends Iterable<ITEM>> GetListFromEntity<ITEM,​S,​R> thenGetList​(Function<R,​S> f)
        Creates a step that returns a list calculated or taken from selected entity-object
        Type Parameters:
        ITEM - is a type of resulted list item
        S - is a type of iterable to get. This iterable is converted to list which consists of required objects
        Parameters:
        f - describes how to get desired data from the entity-object
        Returns:
        step that returns a list after execution.
      • thenGetArray

        public <S> GetArrayFromEntity<S,​R> thenGetArray​(Function<R,​S[]> f)
        Creates a step that returns an array calculated or taken from selected entity-object
        Type Parameters:
        S - is a type of array item
        Parameters:
        f - describes how to get desired data from the entity-object
        Returns:
        step that returns an array after execution.
      • thenGetIterableItem

        public <ITEM,​S extends Iterable<ITEM>> GetItemOfIterableFromEntity<ITEM,​S,​R> thenGetIterableItem​(Function<R,​S> f)
        Creates a step that returns an object taken from an iterable calculated or taken from selected entity-object
        Type Parameters:
        ITEM - is a type of iterable item
        S - is a type of iterable to take the resulted object from
        Parameters:
        f - is how to get an iterable to take the resulted object from
        Returns:
        step that returns an object after execution.
      • thenGetArrayItem

        public <S> GetItemOfArrayFromEntity<S,​R> thenGetArrayItem​(Function<R,​S[]> f)
        Creates a step that returns an object taken from an array calculated or taken from selected entity-object
        Type Parameters:
        S - is a type of array item
        Parameters:
        f - is how to get an array to take the resulted object from
        Returns:
        step that returns an object after execution.