reword some javadoc

This commit is contained in:
Gavin King 2021-12-27 19:39:56 +01:00 committed by Steve Ebersole
parent 4a8a2ae3cc
commit 9d0ee368ca
1 changed files with 16 additions and 13 deletions

View File

@ -330,12 +330,13 @@ public interface Session extends SharedSessionContract, EntityManager {
/** /**
* Return the persistent instance of the given entity class with the given identifier, * Return the persistent instance of the given entity class with the given identifier,
* assuming that the instance exists. This method might return a proxied instance that * making the assumption that the instance exists in the database. This method might
* is initialized on-demand, when a non-identifier method is accessed. * return a proxied instance that is initialized on-demand, when a non-identifier method
* is accessed.
* <p> * <p>
* You should not use this method to determine if an instance exists (use {@code get()} * You should not use this method to determine if an instance exists in the database
* instead). Use this only to retrieve an instance that you assume exists, where * (use {@code get()} instead). Use this only to retrieve an instance that you assume
* non-existence would be an actual error. * exists, where non-existence would be an actual error.
* <p> * <p>
* This operation is very similar to {@link #getReference(Class, Object)}. * This operation is very similar to {@link #getReference(Class, Object)}.
* *
@ -348,12 +349,13 @@ public interface Session extends SharedSessionContract, EntityManager {
/** /**
* Return the persistent instance of the given entity class with the given identifier, * Return the persistent instance of the given entity class with the given identifier,
* assuming that the instance exists. This method might return a proxied instance that * making the assumption that the instance exists in the database. This method might
* is initialized on-demand, when a non-identifier method is accessed. * return a proxied instance that is initialized on-demand, when a non-identifier
* method is accessed.
* <p> * <p>
* You should not use this method to determine if an instance exists (use {@code get()} * You should not use this method to determine if an instance exists in the database
* instead). Use this only to retrieve an instance that you assume exists, where * (use {@code get()} instead). Use this only to retrieve an instance that you assume
* non-existence would be an actual error. * exists, where non-existence would be an actual error.
* *
* @param entityName a persistent class * @param entityName a persistent class
* @param id a valid identifier of an existing persistent instance of the class * @param id a valid identifier of an existing persistent instance of the class
@ -783,9 +785,10 @@ public interface Session extends SharedSessionContract, EntityManager {
/** /**
* Return the persistent instance with the same identity as the given instance, which * Return the persistent instance with the same identity as the given instance, which
* might be detached, assuming that the instance is still persistent in the database. * might be detached, making the assumption that the instance is still persistent in
* This method never results in access to the underlying data store, and thus might * the database. This method never results in access to the underlying data store, and
* return a proxy that must be initialized explicitly. * thus might return a proxy that is initialized on-demand, when a non-identifier
* method is accessed.
* *
* @param object a detached persistent instance * @param object a detached persistent instance
* *