public final class Revision<N extends Number & Comparable<N>,T> extends Object implements Comparable<Revision<N,?>>
RevisionMetadata
as well as the revisioned entity.Constructor and Description |
---|
Revision() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Revision<N,?> that) |
LocalDateTime |
getRequiredRevisionDate()
Returns the revision date of the revision, immediately failing on absence.
|
N |
getRequiredRevisionNumber()
Returns the revision number of the revision, immediately failing on absence.
|
Optional<LocalDateTime> |
getRevisionDate()
Returns the revision date of the revision.
|
Optional<N> |
getRevisionNumber()
Returns the revision number of the revision.
|
static <N extends Number & Comparable<N>,T> |
of(RevisionMetadata<N> metadata,
T entity)
Creates a new
Revision for the given RevisionMetadata and entity. |
String |
toString() |
public static <N extends Number & Comparable<N>,T> Revision<N,T> of(RevisionMetadata<N> metadata, T entity)
Revision
for the given RevisionMetadata
and entity.metadata
- must not be null.entity
- must not be null.public Optional<N> getRevisionNumber()
public N getRequiredRevisionNumber()
public Optional<LocalDateTime> getRevisionDate()
public LocalDateTime getRequiredRevisionDate()
public int compareTo(Revision<N,?> that)
compareTo
in interface Comparable<Revision<N extends Number & Comparable<N>,?>>
Copyright © 2011-2016–2017 Pivotal Software, Inc.. All rights reserved.