@@ -490,7 +490,8 @@ public interface Session extends SharedSessionContract, EntityManager {
490
490
* @param object a detached instance of a persistent class
491
491
* @param replicationMode the replication mode to use
492
492
*
493
- * @deprecated With no real replacement
493
+ * @deprecated With no real replacement. For some use cases try
494
+ * {@link StatelessSession#upsert(Object)}.
494
495
*/
495
496
@ Deprecated ( since = "6.0" )
496
497
void replicate (Object object , ReplicationMode replicationMode );
@@ -505,7 +506,8 @@ public interface Session extends SharedSessionContract, EntityManager {
505
506
* @param object a detached instance of a persistent class
506
507
* @param replicationMode the replication mode to use
507
508
*
508
- * @deprecated With no real replacement
509
+ * @deprecated With no real replacement. For some use cases try
510
+ * {@link StatelessSession#upsert(Object)}.
509
511
*/
510
512
@ Deprecated ( since = "6.0" )
511
513
void replicate (String entityName , Object object , ReplicationMode replicationMode ) ;
@@ -614,26 +616,6 @@ public interface Session extends SharedSessionContract, EntityManager {
614
616
*/
615
617
void lock (Object object , LockOptions lockOptions );
616
618
617
- /**
618
- * Obtain the specified lock level on the given managed instance associated
619
- * with this session. This may be used to:
620
- * <ul>
621
- * <li>perform a version check with {@link LockMode#READ}, or
622
- * <li>upgrade to a pessimistic lock with {@link LockMode#PESSIMISTIC_WRITE}).
623
- * </ul>
624
- * <p>
625
- * This operation cascades to associated instances if the association is
626
- * mapped with {@link org.hibernate.annotations.CascadeType#LOCK}.
627
- *
628
- * @param entityName the name of the entity
629
- * @param object a persistent instance associated with this session
630
- * @param lockMode the lock level
631
- *
632
- * @deprecated use {@link #lock(Object, LockMode)}
633
- */
634
- @ Deprecated (since = "6.2" )
635
- void lock (String entityName , Object object , LockMode lockMode );
636
-
637
619
/**
638
620
* Reread the state of the given managed instance associated with this session
639
621
* from the underlying database. This may be useful:
0 commit comments