|
Spring Data Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.history.AnnotationRevisionMetadata<N>
public class AnnotationRevisionMetadata<N extends Number & Comparable<N>>
A RevisionMetadata implementation that inspects the given object for fields with the configured annotations
and returns the field's values on calls to getRevisionDate() and getRevisionNumber().
| Constructor Summary | |
|---|---|
AnnotationRevisionMetadata(Object entity,
Class<? extends Annotation> revisionNumberAnnotation,
Class<? extends Annotation> revisionTimeStampAnnotation)
Creates a new AnnotationRevisionMetadata inspecing the given entity for the given annotations. |
|
| Method Summary | ||
|---|---|---|
|
getDelegate()
Returns the underlying revision metadata which might provider more detailed implementation specific information. |
|
org.joda.time.DateTime |
getRevisionDate()
Returns the date of the revision. |
|
N |
getRevisionNumber()
Returns the revision number of the revision. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AnnotationRevisionMetadata(Object entity,
Class<? extends Annotation> revisionNumberAnnotation,
Class<? extends Annotation> revisionTimeStampAnnotation)
AnnotationRevisionMetadata inspecing the given entity for the given annotations. If no
annotations will be provided these values will not be looked up from the entity and return null.
entity - must not be null.revisionNumberAnnotation - revisionTimeStampAnnotation - | Method Detail |
|---|
public N getRevisionNumber()
RevisionMetadata
getRevisionNumber in interface RevisionMetadata<N extends Number & Comparable<N>>public org.joda.time.DateTime getRevisionDate()
RevisionMetadata
getRevisionDate in interface RevisionMetadata<N extends Number & Comparable<N>>public <T> T getDelegate()
RevisionMetadata
getDelegate in interface RevisionMetadata<N extends Number & Comparable<N>>
|
Spring Data Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||