public ReflectionRevisionEntityInformation(Class<?> revisionEntityClass) { Assert.notNull(revisionEntityClass, "Revision entity class or type constructor parameter should not be null"); AnnotationDetectionFieldCallback fieldCallback = new AnnotationDetectionFieldCallback(RevisionNumber.class); ReflectionUtils.doWithFields(revisionEntityClass, fieldCallback); this.revisionNumberType = fieldCallback.getType(); this.revisionEntityClass = revisionEntityClass; }
private RevisionMetadata<?> getRevisionMetadata(Object object) { if (object instanceof DefaultRevisionEntity) { return new DefaultRevisionMetadata((RevisionInfoEntity) object); } else { return new AnnotationRevisionMetadata<N>(object, RevisionNumber.class, RevisionTimestamp.class); } }