Skip to content

Commit

Permalink
reword some javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinking authored and sebersole committed Dec 27, 2021
1 parent 4a8a2ae commit 9d0ee36
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions hibernate-core/src/main/java/org/hibernate/Session.java
Expand Up @@ -330,12 +330,13 @@ public interface Session extends SharedSessionContract, EntityManager {

/**
* 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
* is initialized on-demand, when a non-identifier method is accessed.
* making the assumption that the instance exists in the database. This method might
* return a proxied instance that is initialized on-demand, when a non-identifier method
* is accessed.
* <p>
* You should not use this method to determine if an instance exists (use {@code get()}
* instead). Use this only to retrieve an instance that you assume exists, where
* non-existence would be an actual error.
* You should not use this method to determine if an instance exists in the database
* (use {@code get()} instead). Use this only to retrieve an instance that you assume
* exists, where non-existence would be an actual error.
* <p>
* This operation is very similar to {@link #getReference(Class, Object)}.
*
Expand All @@ -348,12 +349,13 @@ public interface Session extends SharedSessionContract, EntityManager {

/**
* 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
* is initialized on-demand, when a non-identifier method is accessed.
* making the assumption that the instance exists in the database. This method might
* return a proxied instance that is initialized on-demand, when a non-identifier
* method is accessed.
* <p>
* You should not use this method to determine if an instance exists (use {@code get()}
* instead). Use this only to retrieve an instance that you assume exists, where
* non-existence would be an actual error.
* You should not use this method to determine if an instance exists in the database
* (use {@code get()} instead). Use this only to retrieve an instance that you assume
* exists, where non-existence would be an actual error.
*
* @param entityName a persistent class
* @param id a valid identifier of an existing persistent instance of the class
Expand Down Expand Up @@ -783,9 +785,10 @@ public interface Session extends SharedSessionContract, EntityManager {

/**
* 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.
* This method never results in access to the underlying data store, and thus might
* return a proxy that must be initialized explicitly.
* might be detached, making the assumption that the instance is still persistent in
* the database. This method never results in access to the underlying data store, and
* thus might return a proxy that is initialized on-demand, when a non-identifier
* method is accessed.
*
* @param object a detached persistent instance
*
Expand Down

0 comments on commit 9d0ee36

Please sign in to comment.