Package it.tidalwave.util.spi
Class FinderWithIdSupport<T,I extends T,F extends ExtendedFinderSupport<T,F>>
- java.lang.Object
-
- it.tidalwave.util.spi.HierarchicFinderSupport<T,F>
-
- it.tidalwave.util.spi.FinderWithIdSupport<T,I,F>
-
- Type Parameters:
T
- the product abstract typeI
- the product concrete typeF
- theFinder
type
- All Implemented Interfaces:
Finder<T>
,ExtendedFinderSupport<T,F>
,FinderWithId<T,F>
,java.io.Serializable
,java.lang.Cloneable
- Direct Known Subclasses:
FinderWithIdMapSupport
public class FinderWithIdSupport<T,I extends T,F extends ExtendedFinderSupport<T,F>> extends HierarchicFinderSupport<T,F> implements FinderWithId<T,F>
A support class for implementing aFinder
that provides filtering by id.- Since:
- 3.2-ALPHA-15
- Author:
- Fabrizio Giudici
- See Also:
- Serialized Form
- Status: experimental API
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface it.tidalwave.util.Finder
Finder.InMemorySortCriterion<U>, Finder.SortCriterion, Finder.SortDirection
-
-
Field Summary
-
Fields inherited from class it.tidalwave.util.spi.HierarchicFinderSupport
firstResult, maxResults
-
-
Constructor Summary
Constructors Constructor Description FinderWithIdSupport()
FinderWithIdSupport(FinderWithIdSupport<T,I,F> other, java.lang.Object override)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<T>
computeResults()
Subclasses can implement this method where *all* the raw results must be actually retrieved.protected java.util.List<T>
findAll()
protected java.util.Optional<T>
findById(Id id)
protected java.util.stream.Stream<I>
streamImpl()
F
withId(Id id)
-
Methods inherited from class it.tidalwave.util.spi.HierarchicFinderSupport
clone, clone, clonedWith, computeNeededResults, count, from, getSource, max, ofType, results, sort, sort, withContext
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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()
-
FinderWithIdSupport
public FinderWithIdSupport(@Nonnull FinderWithIdSupport<T,I,F> other, @Nonnull java.lang.Object override)
-
-
Method Detail
-
withId
@Nonnull public F withId(@Nonnull Id id)
- Specified by:
withId
in interfaceFinderWithId<T,I extends T>
-
computeResults
@Nonnull protected java.util.List<T> computeResults()
Description copied from class:HierarchicFinderSupport
Subclasses can implement this method where *all* the raw results must be actually retrieved.- Overrides:
computeResults
in classHierarchicFinderSupport<T,F extends ExtendedFinderSupport<T,F>>
- Returns:
- the unprocessed results
-
findAll
@Nonnull protected java.util.List<T> findAll()
-
streamImpl
@Nonnull protected java.util.stream.Stream<I> streamImpl()
-
-