Class FinderWithIdSupport<TYPE,​IMPLTYPE extends TYPE,​FINDER extends it.tidalwave.util.spi.ExtendedFinderSupport<TYPE,​FINDER>>

  • Type Parameters:
    TYPE - the product abstract type
    IMPLTYPE - the product concrete type
    FINDER - the Finder type
    All Implemented Interfaces:
    it.tidalwave.util.Finder<TYPE>, it.tidalwave.util.spi.ExtendedFinderSupport<TYPE,​FINDER>, java.io.Serializable, java.lang.Cloneable
    Direct Known Subclasses:
    FinderWithIdMapSupport

    public class FinderWithIdSupport<TYPE,​IMPLTYPE extends TYPE,​FINDER extends it.tidalwave.util.spi.ExtendedFinderSupport<TYPE,​FINDER>>
    extends it.tidalwave.util.spi.FinderSupport<TYPE,​FINDER>
    implements it.tidalwave.util.spi.ExtendedFinderSupport<TYPE,​FINDER>, it.tidalwave.util.Finder<TYPE>
    A support class for implementing a Finder that provides filtering by id.
    Author:
    Fabrizio Giudici
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface it.tidalwave.util.Finder

        it.tidalwave.util.Finder.FilterSortCriterion<TYPE extends java.lang.Object>, it.tidalwave.util.Finder.SortCriterion, it.tidalwave.util.Finder.SortDirection
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.List<IMPLTYPE> computeResults()  
      protected java.util.List<IMPLTYPE> findAll()  
      protected java.util.Optional<IMPLTYPE> findById​(it.tidalwave.util.Id id)  
      protected java.util.stream.Stream<IMPLTYPE> streamImpl()  
      FINDER withId​(it.tidalwave.util.Id id)  
      • Methods inherited from class it.tidalwave.util.spi.FinderSupport

        clone, clone, computeNeededResults, count, firstResult, from, getContexts, getSource, max, ofType, result, results, sort, sort, toString, withContext
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface it.tidalwave.util.spi.ExtendedFinderSupport

        from, max, sort, sort, withContext
      • Methods inherited from interface it.tidalwave.util.Finder

        count, firstResult, iterator, ofType, optionalFirstResult, optionalResult, result, results, stream
    • Constructor Detail

      • FinderWithIdSupport

        public FinderWithIdSupport()
    • Method Detail

      • withId

        @Nonnull
        public FINDER withId​(@Nonnull
                             it.tidalwave.util.Id id)
      • computeResults

        @Nonnull
        protected java.util.List<IMPLTYPE> computeResults()
        Overrides:
        computeResults in class it.tidalwave.util.spi.FinderSupport<TYPE,​FINDER extends it.tidalwave.util.spi.ExtendedFinderSupport<TYPE,​FINDER>>
      • findAll

        @Nonnull
        protected java.util.List<IMPLTYPE> findAll()
      • findById

        @Nonnull
        protected java.util.Optional<IMPLTYPE> findById​(@Nonnull
                                                        it.tidalwave.util.Id id)
      • streamImpl

        @Nonnull
        protected java.util.stream.Stream<IMPLTYPE> streamImpl()