DATACMNS-91 - Clarify contract for CrudRepository.

Added JavaDoc to document expected exceptions for null parameters.
This commit is contained in:
Oliver Gierke
2011-12-02 13:31:02 +01:00
parent 0b04251bbe
commit f8b37b8501

View File

@@ -39,7 +39,8 @@ public interface CrudRepository<T, ID extends Serializable> extends Repository<T
* Saves all given entities.
*
* @param entities
* @return
* @return the saved entities
* @throws IllegalArgumentException in case the given entity is (@literal null}.
*/
Iterable<T> save(Iterable<? extends T> entities);
@@ -87,6 +88,7 @@ public interface CrudRepository<T, ID extends Serializable> extends Repository<T
* Deletes a given entity.
*
* @param entity
* @throws IllegalArgumentException in case the given entity is (@literal null}.
*/
void delete(T entity);
@@ -94,6 +96,7 @@ public interface CrudRepository<T, ID extends Serializable> extends Repository<T
* Deletes the given entities.
*
* @param entities
* @throws IllegalArgumentException in case the given {@link Iterable} is (@literal null}.
*/
void delete(Iterable<? extends T> entities);