org.springframework.data.repository.history

## 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

All Methods Instance Methods Abstract Methods
`Optional<Revision<N,T>>` `findLastChangeRevision(ID id)` Returns the revision of the entity it was last changed in.
`Optional<Revision<N,T>>` `findRevision(ID id, N revisionNumber)` Returns the entity with the given ID in the given revision number.
`Revisions<N,T>` `findRevisions(ID id)` Returns all `Revisions` of an entity with the given id.
`Page<Revision<N,T>>` `findRevisions(ID id, Pageable pageable)` Returns a `Page` of revisions for the entity with the given id.

### Method Detail

#### findLastChangeRevision

    Optional<Revision<N,T>> findLastChangeRevision(ID id)

Returns the revision of the entity it was last changed in.

Parameters:
  `id` - must not be null.
Returns:

#### findRevisions

    Revisions<N,T> findRevisions(ID id)

Returns all `Revisions` of an entity with the given id.

Parameters:
  `id` - must not be null.
Returns:

#### findRevisions

    Page<Revision<N,T>> findRevisions(ID id,
                                      Pageable pageable)

Returns a `Page` 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` -
Returns:
See Also:
  `RevisionSort`

#### findRevision

    Optional<Revision<N,T>> findRevision(ID id,
                                         N revisionNumber)

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