From 2544bb1a547d89b8686ec75ed7d5e42afe4c8e06 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Wed, 18 May 2016 13:07:20 +0200 Subject: [PATCH] DATACMNS-858 - Fixed JavaDoc for CrudMethods.getDeleteMethod(). We're now correctly stating that we're preferring the delete method that takes the entity as argument over the one taking the id to match what's actually implemented. --- .../org/springframework/data/repository/core/CrudMethods.java | 4 ++-- .../data/repository/core/support/DefaultCrudMethods.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/springframework/data/repository/core/CrudMethods.java b/src/main/java/org/springframework/data/repository/core/CrudMethods.java index 8a87dbad0..2dc8bf63f 100644 --- a/src/main/java/org/springframework/data/repository/core/CrudMethods.java +++ b/src/main/java/org/springframework/data/repository/core/CrudMethods.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2016 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. @@ -79,7 +79,7 @@ public interface CrudMethods { boolean hasFindOneMethod(); /** - * Returns the delete method of the repository. Will prefer a delete-by-id method over a delete-by-entity method. + * Returns the delete method of the repository. Will prefer a delete-by-entity method over a delete-by-id method. * * @return the delete method of the repository or {@literal null} if not available. * @see #hasDelete() diff --git a/src/main/java/org/springframework/data/repository/core/support/DefaultCrudMethods.java b/src/main/java/org/springframework/data/repository/core/support/DefaultCrudMethods.java index a6ce75c1b..e94691547 100644 --- a/src/main/java/org/springframework/data/repository/core/support/DefaultCrudMethods.java +++ b/src/main/java/org/springframework/data/repository/core/support/DefaultCrudMethods.java @@ -94,9 +94,10 @@ public class DefaultCrudMethods implements CrudMethods { /** * The most suitable delete method is selected as follows: We prefer *
    + *
  1. a {@link RepositoryMetadata#getDomainType()} as first parameter over
  2. *
  3. a {@link RepositoryMetadata#getIdType()} as first parameter over
  4. *
  5. a {@link Serializable} as first parameter over
  6. - *
  7. an {@link Iterable} as first parameter
  8. + *
  9. an {@link Iterable} as first parameter.
  10. *
* * @param metadata must not be {@literal null}.