Browse Source

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.
pull/172/head
Oliver Gierke 10 years ago
parent
commit
2544bb1a54
  1. 4
      src/main/java/org/springframework/data/repository/core/CrudMethods.java
  2. 3
      src/main/java/org/springframework/data/repository/core/support/DefaultCrudMethods.java

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

@ -1,5 +1,5 @@ @@ -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 { @@ -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()

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

@ -94,9 +94,10 @@ public class DefaultCrudMethods implements CrudMethods { @@ -94,9 +94,10 @@ public class DefaultCrudMethods implements CrudMethods {
/**
* The most suitable delete method is selected as follows: We prefer
* <ol>
* <li>a {@link RepositoryMetadata#getDomainType()} as first parameter over</li>
* <li>a {@link RepositoryMetadata#getIdType()} as first parameter over</li>
* <li>a {@link Serializable} as first parameter over</li>
* <li>an {@link Iterable} as first parameter</li>
* <li>an {@link Iterable} as first parameter.</li>
* </ol>
*
* @param metadata must not be {@literal null}.

Loading…
Cancel
Save