102102 * behavior is appropriate for programs which use optimistic locking. 
103103 * <ul> 
104104 * <li>A different lock level may be obtained by explicitly specifying the mode using 
105-  *     {@link #get (Class,  Object, LockMode )}, {@link #find(Class,  Object, LockModeType )}, 
106-  *     {@link #refresh(Object, LockMode )}, {@link #refresh(Object, LockModeType )}, or  
107-  *     {@link org.hibernate.query.SelectionQuery#setLockMode(LockModeType)}. 
105+  *     {@link #find (Class,Object,LockModeType )}, {@link #find(Class,Object,FindOption... )}, 
106+  *     {@link #refresh(Object,LockModeType )}, {@link #refresh(Object,RefreshOption... )}, 
107+  *     or  {@link org.hibernate.query.SelectionQuery#setLockMode(LockModeType)}. 
108108 * <li>The lock level of a managed instance already held by the session may be upgraded 
109109 *     to a more restrictive lock level by calling {@link #lock(Object, LockMode)} or 
110110 *     {@link #lock(Object, LockModeType)}. 
@@ -802,7 +802,8 @@ public interface Session extends SharedSessionContract, EntityManager {
802802	 * with {@link jakarta.persistence.CascadeType#REFRESH}. 
803803	 * <p> 
804804	 * This operation requests {@link LockMode#READ}. To obtain a stronger lock, 
805- 	 * call {@link #refresh(Object, LockMode)}. 
805+ 	 * call {@link #refresh(Object, RefreshOption...)}, passing the appropriate 
806+ 	 * {@link LockMode} as an option. 
806807	 * 
807808	 * @param object a persistent instance associated with this session 
808809	 */ 
@@ -938,6 +939,24 @@ public interface Session extends SharedSessionContract, EntityManager {
938939	@ Deprecated (since  = "7.0" , forRemoval  = true )
939940	Object  get (String  entityName , Object  id , LockMode  lockMode );
940941
942+ 	/** 
943+ 	 * Return the persistent instance of the given entity class with the given identifier, 
944+ 	 * or null if there is no such persistent instance. If the instance is already associated 
945+ 	 * with the session, return that instance. This method never returns an uninitialized 
946+ 	 * instance. Obtain the specified lock mode if the instance exists. 
947+ 	 * 
948+ 	 * @param entityType the entity type 
949+ 	 * @param id an identifier 
950+ 	 * @param lockOptions the lock mode 
951+ 	 * 
952+ 	 * @return a persistent instance or null 
953+ 	 * 
954+ 	 * @deprecated This method will be removed. 
955+ 	 *             Use {@link #find(Class, Object, FindOption...)} instead. 
956+ 	 */ 
957+ 	@ Deprecated (since  = "7.0" , forRemoval  = true )
958+ 	<T > T  get (Class <T > entityType , Object  id , LockOptions  lockOptions );
959+ 
941960	/** 
942961	 * Return the persistent instance of the given entity class with the given identifier, 
943962	 * or null if there is no such persistent instance. If the instance is already associated 
@@ -950,7 +969,11 @@ public interface Session extends SharedSessionContract, EntityManager {
950969	 * 
951970	 * @return a persistent instance or null 
952971	 * 
953- 	 * @deprecated Use {@linkplain #find(Class, Object, FindOption...)} instead 
972+ 	 * @deprecated This method will be removed. 
973+ 	 *             Use {@link SessionFactory#createGraphForDynamicEntity(String)} 
974+ 	 *             together with {@link #find(EntityGraph, Object, FindOption...)} 
975+ 	 *             to load {@link org.hibernate.metamodel.RepresentationMode#MAP 
976+ 	 *             dynamic entities}. 
954977	 */ 
955978	@ Deprecated (since  = "7.0" , forRemoval  = true )
956979	Object  get (String  entityName , Object  id , LockOptions  lockOptions );
@@ -967,7 +990,8 @@ public interface Session extends SharedSessionContract, EntityManager {
967990	 * 
968991	 * @since 6.2 
969992	 * 
970- 	 * @deprecated Use {@linkplain #lock(Object, LockModeType, LockOption...)} instead 
993+ 	 * @deprecated This method will be removed. 
994+ 	 *             Use {@linkplain #lock(Object, LockModeType, LockOption...)} instead 
971995	 */ 
972996	@ Deprecated (since  = "7.0" , forRemoval  = true )
973997	void  lock (Object  object , LockOptions  lockOptions );
@@ -979,7 +1003,8 @@ public interface Session extends SharedSessionContract, EntityManager {
9791003	 * @param object a persistent instance associated with this session 
9801004	 * @param lockOptions contains the lock mode to use 
9811005	 * 
982- 	 * @deprecated Use {@linkplain #refresh(Object, RefreshOption...)} instead 
1006+ 	 * @deprecated This method will be removed. 
1007+ 	 *             Use {@linkplain #refresh(Object, RefreshOption...)} instead 
9831008	 */ 
9841009	@ Deprecated (since  = "7.0" , forRemoval  = true )
9851010	void  refresh (Object  object , LockOptions  lockOptions );
0 commit comments