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(RevisionMetadata<N> metadata,
T entity)
Creates a new
Revision consisting of the given RevisionMetadata and entity. |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Revision<N,?> that) |
boolean |
equals(Object obj) |
T |
getEntity()
Returns the underlying entity.
|
RevisionMetadata<N> |
getMetadata()
Returns the
RevisionMetadata for the current Revision . |
org.joda.time.DateTime |
getRevisionDate()
Returns the revision date of the revision.
|
N |
getRevisionNumber()
Returns the revision number of the revision.
|
int |
hashCode() |
String |
toString() |
public Revision(RevisionMetadata<N> metadata, T entity)
Revision
consisting of the given RevisionMetadata
and entity.metadata
- must not be null.entity
- must not be null.public N getRevisionNumber()
public org.joda.time.DateTime getRevisionDate()
public T getEntity()
public RevisionMetadata<N> getMetadata()
RevisionMetadata
for the current Revision
.public int compareTo(Revision<N,?> that)
compareTo
in interface Comparable<Revision<N extends Number & Comparable<N>,?>>
Copyright © 2011-2014–2015 Pivotal Software, Inc.. All rights reserved.