Package 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, Johannes Englmeier
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription<T> TReturns the underlying revision metadata which might provider more detailed implementation specific information.default InstantReturns the time stamp of the revision, immediately failing on absence.default NReturns the revision number of the revision, immediately failing on absence.Returns the timestamp of the revision.Returns the revision number of the revision.default RevisionMetadata.RevisionTypeReturns theRevisionMetadata.RevisionTypeof this change.
-
Method Details
-
getRevisionNumber
Returns the revision number of the revision.- Returns:
- will never be null.
-
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
Returns the timestamp of the revision.- Returns:
- will never be null.
-
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
Returns theRevisionMetadata.RevisionTypeof this change. If theRevisionMetadata.RevisionTypecannot be determined, this method returnsRevisionMetadata.RevisionType.UNKNOWN.- Returns:
- will never be null.
- Since:
- 2.2.0
-