I
- the type of IDs of entitiesE
- the type of entitiespublic interface RepositoryView<I,E extends Entity<I,?>>
A Repository
may have a view that provides a different set of entities.
For example, there can be views that represent inactive entities (e.g. archived or deleted).
Repository
itself is also a RepositoryView
, which loads only
active entities.
Modifier and Type | Method and Description |
---|---|
java.util.Optional<E> |
find(I id)
Finds an entity with the passed ID.
|
java.util.Iterator<E> |
iterator(java.util.function.Predicate<E> filter)
Returns an iterator over the entities exposed by the view
that match the passed filter.
|