HHH-18540 remove an overload of lock() that's completely useless
Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
parent
d38971f75b
commit
11b11c02eb
|
@ -490,7 +490,8 @@ public interface Session extends SharedSessionContract, EntityManager {
|
|||
* @param object a detached instance of a persistent class
|
||||
* @param replicationMode the replication mode to use
|
||||
*
|
||||
* @deprecated With no real replacement
|
||||
* @deprecated With no real replacement. For some use cases try
|
||||
* {@link StatelessSession#upsert(Object)}.
|
||||
*/
|
||||
@Deprecated( since = "6.0" )
|
||||
void replicate(Object object, ReplicationMode replicationMode);
|
||||
|
@ -505,7 +506,8 @@ public interface Session extends SharedSessionContract, EntityManager {
|
|||
* @param object a detached instance of a persistent class
|
||||
* @param replicationMode the replication mode to use
|
||||
*
|
||||
* @deprecated With no real replacement
|
||||
* @deprecated With no real replacement. For some use cases try
|
||||
* {@link StatelessSession#upsert(Object)}.
|
||||
*/
|
||||
@Deprecated( since = "6.0" )
|
||||
void replicate(String entityName, Object object, ReplicationMode replicationMode) ;
|
||||
|
@ -614,26 +616,6 @@ public interface Session extends SharedSessionContract, EntityManager {
|
|||
*/
|
||||
void lock(Object object, LockOptions lockOptions);
|
||||
|
||||
/**
|
||||
* Obtain the specified lock level on the given managed instance associated
|
||||
* with this session. This may be used to:
|
||||
* <ul>
|
||||
* <li>perform a version check with {@link LockMode#READ}, or
|
||||
* <li>upgrade to a pessimistic lock with {@link LockMode#PESSIMISTIC_WRITE}).
|
||||
* </ul>
|
||||
* <p>
|
||||
* This operation cascades to associated instances if the association is
|
||||
* mapped with {@link org.hibernate.annotations.CascadeType#LOCK}.
|
||||
*
|
||||
* @param entityName the name of the entity
|
||||
* @param object a persistent instance associated with this session
|
||||
* @param lockMode the lock level
|
||||
*
|
||||
* @deprecated use {@link #lock(Object, LockMode)}
|
||||
*/
|
||||
@Deprecated(since = "6.2")
|
||||
void lock(String entityName, Object object, LockMode lockMode);
|
||||
|
||||
/**
|
||||
* Reread the state of the given managed instance associated with this session
|
||||
* from the underlying database. This may be useful:
|
||||
|
|
|
@ -895,11 +895,6 @@ public class SessionDelegatorBaseImpl implements SessionImplementor {
|
|||
delegate.lock( object, lockMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lock(String entityName, Object object, LockMode lockMode) {
|
||||
delegate.lock( entityName, object, lockMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lock(String entityName, Object object, LockOptions lockOptions) {
|
||||
delegate.lock( entityName, object, lockOptions );
|
||||
|
|
|
@ -228,11 +228,6 @@ public class SessionLazyDelegator implements Session {
|
|||
this.lazySession.get().lock( object, lockMode );
|
||||
}
|
||||
|
||||
@Override @Deprecated
|
||||
public void lock(String entityName, Object object, LockMode lockMode) {
|
||||
this.lazySession.get().lock( entityName, object, lockMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lock(Object object, LockOptions lockOptions) {
|
||||
this.lazySession.get().lock( object, lockOptions );
|
||||
|
|
|
@ -647,11 +647,6 @@ public class SessionImpl
|
|||
fireLock( new LockEvent( entityName, object, lockOptions, this ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lock(String entityName, Object object, LockMode lockMode) throws HibernateException {
|
||||
fireLock( new LockEvent( entityName, object, lockMode, this ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lock(Object object, LockMode lockMode) throws HibernateException {
|
||||
fireLock( new LockEvent( object, lockMode, this ) );
|
||||
|
|
Loading…
Reference in New Issue