org.springframework.data.history

## Interface RevisionMetadata<N extends Number & Comparable<N>>

All Known Implementing Classes:
  AnnotationRevisionMetadata

    public interface RevisionMetadata<N extends Number & Comparable<N>>

Metadata about a revision.

Author:
  Philipp Huegelmeyer, Oliver Gierke, Jens Schauder

### Nested Class Summary

Nested Classes
`static class` `RevisionMetadata.RevisionType` The type of a `Revision`.

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`<T> T` `getDelegate()` Returns the underlying revision metadata which might provider more detailed implementation specific information.
`default Instant` `getRequiredRevisionInstant()` Returns the time stamp of the revision, immediately failing on absence.
`default N` `getRequiredRevisionNumber()` Returns the revision number of the revision, immediately failing on absence.
`Optional<Instant>` `getRevisionInstant()` Returns the timestamp of the revision.
`Optional<N>` `getRevisionNumber()` Returns the revision number of the revision.
`default RevisionMetadata.RevisionType` `getRevisionType()` Returns the `RevisionMetadata.RevisionType` of this change.

### Method Detail

#### getRevisionNumber

    Optional<N> getRevisionNumber()

Returns the revision number of the revision.

Returns:
  will never be null.

#### getRequiredRevisionNumber

    default N getRequiredRevisionNumber()

Returns the revision number of the revision, immediately failing on absence.

Returns:
  will never be null.
Throws:
  `IllegalStateException` - if no revision number is available.

#### getRevisionInstant

    Optional<Instant> getRevisionInstant()

Returns the timestamp of the revision.

Returns:
  will never be null.

#### getRequiredRevisionInstant

    default Instant getRequiredRevisionInstant()

Returns the time stamp of the revision, immediately failing on absence.

Returns:
  will never be null.
Throws:
  `IllegalStateException` - if no revision date is available.

#### getDelegate

    <T> T getDelegate()

Returns the underlying revision metadata which might provider more detailed implementation specific information.

Returns:

#### getRevisionType

    default RevisionMetadata.RevisionType getRevisionType()

Returns the `RevisionMetadata.RevisionType` of this change. If the `RevisionMetadata.RevisionType` cannot be determined, this method returns `RevisionMetadata.RevisionType.UNKNOWN`.

Returns:
  will never be null.
Since:
  2.2.0