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
  • Method Details

    • 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