DATACMNS-20 - Adapted refactoring of Repository.findById(…) to findOne(…).

This commit is contained in:
Oliver Gierke
2011-03-11 18:19:45 +01:00
parent 4daab96bc4
commit 01a800b2cc

View File

@@ -90,7 +90,7 @@ public class SimpleMongoRepository<T, ID extends Serializable> implements Paging
*
* @see org.springframework.data.repository.Repository#findById(java.io.Serializable )
*/
public T findById(ID id) {
public T findOne(ID id) {
return template.findOne(entityInformation.getCollectionName(), getIdQuery(id), entityInformation.getJavaType());
}
@@ -113,7 +113,7 @@ public class SimpleMongoRepository<T, ID extends Serializable> implements Paging
*/
public boolean exists(ID id) {
return findById(id) != null;
return findOne(id) != null;
}
/*