Interface RevisionRepository<T,ID,N extends Number & Comparable<N>>
- All Superinterfaces:
Repository<T,
ID>
@NoRepositoryBean
public interface RevisionRepository<T,ID,N extends Number & Comparable<N>>
extends Repository<T,ID>
A repository which can access entities held in a variety of
Revisions
.- Author:
- Oliver Gierke, Philipp Huegelmeyer
-
Method Summary
Modifier and TypeMethodDescriptionReturns the revision of the entity it was last changed in.findRevision
(ID id, N revisionNumber) Returns the entity with the given ID in the given revision number.findRevisions
(ID id) Returns allRevisions
of an entity with the given id.findRevisions
(ID id, Pageable pageable) Returns aPage
of revisions for the entity with the given id.
-
Method Details
-
findLastChangeRevision
Returns the revision of the entity it was last changed in.- Parameters:
id
- must not be null.- Returns:
-
findRevisions
Returns allRevisions
of an entity with the given id.- Parameters:
id
- must not be null.- Returns:
-
findRevisions
Returns aPage
of revisions for the entity with the given id. Note, that it's not guaranteed that implementations have to support sorting by all properties.- Parameters:
id
- must not be null.pageable
- the pageable to request a paged result, can bePageable.unpaged()
, must not be null.- Returns:
- See Also:
-
findRevision
Returns the entity with the given ID in the given revision number.- Parameters:
id
- must not be null.revisionNumber
- must not be null.- Returns:
- the
Revision
of the entity with the given ID in the given revision number. - Since:
- 1.12
-