DATAJPA-1321 - Fixed javadoc of JpaRepository.getOne(…).

This commit is contained in:
Oliver Drotbohm
2019-01-29 17:00:45 +01:00
parent ca4cf6690a
commit 7ba3d1d3a9

View File

@@ -90,12 +90,14 @@ public interface JpaRepository<T, ID> extends PagingAndSortingRepository<T, ID>,
void deleteAllInBatch();
/**
* Returns a reference to the entity with the given identifier.
* Returns a reference to the entity with the given identifier. Depending on how the JPA persistence provider is
* implemented this is very likely to always return an instance and throw an
* {@link javax.persistence.EntityNotFoundException} on first access. Some of them will reject invalid identifiers
* immediately.
*
* @param id must not be {@literal null}.
* @return a reference to the entity with the given identifier.
* @see EntityManager#getReference(Class, Object)
* @throws javax.persistence.EntityNotFoundException if no entity exists for given {@code id}.
* @see EntityManager#getReference(Class, Object) for details on when an exception is thrown.
*/
T getOne(ID id);