From db2a09192b42e20dab3ae178bb9161e1ec6d285d Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Mon, 16 Nov 2015 17:07:33 +0100 Subject: [PATCH] DATACMNS-785 - Added RevisionRepository.findRevision(ID, N). --- .../data/repository/history/RevisionRepository.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/springframework/data/repository/history/RevisionRepository.java b/src/main/java/org/springframework/data/repository/history/RevisionRepository.java index ef30cffaf..d8f5b1f58 100755 --- a/src/main/java/org/springframework/data/repository/history/RevisionRepository.java +++ b/src/main/java/org/springframework/data/repository/history/RevisionRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 the original author or authors. + * Copyright 2012-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -56,4 +56,14 @@ public interface RevisionRepository> findRevisions(ID id, Pageable pageable); + + /** + * Returns the entity with the given ID in the given revision number. + * + * @param id must not be {@literal null}. + * @param revisionNumber must not be {@literal null}. + * @return the entity with the given ID in the given revision number. + * @since 1.12 + */ + Revision findRevision(ID id, N revisionNumber); }