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
-
Method Summary
Modifier and TypeMethodDescription<T> T
Returns the underlying revision metadata which might provider more detailed implementation specific information.default Instant
Returns the time stamp of the revision, immediately failing on absence.default N
Returns 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.RevisionType
Returns theRevisionMetadata.RevisionType
of 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.RevisionType
of this change. If theRevisionMetadata.RevisionType
cannot be determined, this method returnsRevisionMetadata.RevisionType.UNKNOWN
.- Returns:
- will never be null.
- Since:
- 2.2.0
-