Skip to content

Commit c51f553

Browse files
committed
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.
1 parent fa7ab50 commit c51f553

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/main/java/org/springframework/data/repository/core/CrudMethods.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013 the original author or authors.
2+
* Copyright 2013-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -79,7 +79,7 @@ public interface CrudMethods {
7979
boolean hasFindOneMethod();
8080

8181
/**
82-
* Returns the delete method of the repository. Will prefer a delete-by-id method over a delete-by-entity method.
82+
* Returns the delete method of the repository. Will prefer a delete-by-entity method over a delete-by-id method.
8383
*
8484
* @return the delete method of the repository or {@literal null} if not available.
8585
* @see #hasDelete()

src/main/java/org/springframework/data/repository/core/support/DefaultCrudMethods.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,10 @@ private Method selectMostSuitableSaveMethod(RepositoryMetadata metadata) {
9494
/**
9595
* The most suitable delete method is selected as follows: We prefer
9696
* <ol>
97+
* <li>a {@link RepositoryMetadata#getDomainType()} as first parameter over</li>
9798
* <li>a {@link RepositoryMetadata#getIdType()} as first parameter over</li>
9899
* <li>a {@link Serializable} as first parameter over</li>
99-
* <li>an {@link Iterable} as first parameter</li>
100+
* <li>an {@link Iterable} as first parameter.</li>
100101
* </ol>
101102
*
102103
* @param metadata must not be {@literal null}.

0 commit comments

Comments
 (0)