push down some methods from SessionImplementor to EventSource
just as recommended by the @Deprecated tags added in H6 Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
parent
681bd09b9d
commit
ab12b436a2
|
@ -38,8 +38,6 @@ import org.hibernate.engine.jdbc.spi.JdbcCoordinator;
|
||||||
import org.hibernate.engine.jdbc.spi.JdbcServices;
|
import org.hibernate.engine.jdbc.spi.JdbcServices;
|
||||||
import org.hibernate.event.spi.EventManager;
|
import org.hibernate.event.spi.EventManager;
|
||||||
import org.hibernate.event.spi.EventSource;
|
import org.hibernate.event.spi.EventSource;
|
||||||
import org.hibernate.event.spi.MergeContext;
|
|
||||||
import org.hibernate.event.spi.PersistContext;
|
|
||||||
import org.hibernate.graph.RootGraph;
|
import org.hibernate.graph.RootGraph;
|
||||||
import org.hibernate.graph.spi.RootGraphImplementor;
|
import org.hibernate.graph.spi.RootGraphImplementor;
|
||||||
import org.hibernate.jdbc.ReturningWork;
|
import org.hibernate.jdbc.ReturningWork;
|
||||||
|
@ -1130,26 +1128,6 @@ public class SessionDelegatorBaseImpl implements SessionImplementor {
|
||||||
delegate.forceFlush( e );
|
delegate.forceFlush( e );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void merge(String entityName, Object object, MergeContext copiedAlready) throws HibernateException {
|
|
||||||
delegate.merge( entityName, object, copiedAlready );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void persist(String entityName, Object object, PersistContext createdAlready) throws HibernateException {
|
|
||||||
delegate.persist( entityName, object, createdAlready );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void persistOnFlush(String entityName, Object object, PersistContext copiedAlready) {
|
|
||||||
delegate.persistOnFlush( entityName, object, copiedAlready );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void removeOrphanBeforeUpdates(String entityName, Object child) {
|
|
||||||
delegate.removeOrphanBeforeUpdates( entityName, child );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SessionImplementor getSession() {
|
public SessionImplementor getSession() {
|
||||||
return this;
|
return this;
|
||||||
|
|
|
@ -11,9 +11,6 @@ import org.hibernate.LockOptions;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.engine.jdbc.LobCreationContext;
|
import org.hibernate.engine.jdbc.LobCreationContext;
|
||||||
import org.hibernate.engine.jdbc.spi.JdbcCoordinator;
|
import org.hibernate.engine.jdbc.spi.JdbcCoordinator;
|
||||||
import org.hibernate.event.spi.MergeContext;
|
|
||||||
import org.hibernate.event.spi.PersistContext;
|
|
||||||
import org.hibernate.event.spi.RefreshContext;
|
|
||||||
import org.hibernate.graph.spi.RootGraphImplementor;
|
import org.hibernate.graph.spi.RootGraphImplementor;
|
||||||
import org.hibernate.persister.entity.EntityPersister;
|
import org.hibernate.persister.entity.EntityPersister;
|
||||||
import org.hibernate.query.spi.QueryImplementor;
|
import org.hibernate.query.spi.QueryImplementor;
|
||||||
|
@ -103,30 +100,6 @@ public interface SessionImplementor extends Session, SharedSessionContractImplem
|
||||||
*/
|
*/
|
||||||
void lock(String entityName, Object child, LockOptions lockOptions);
|
void lock(String entityName, Object child, LockOptions lockOptions);
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated OperationalContext should cover this overload I believe
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
void merge(String entityName, Object object, MergeContext copiedAlready) throws HibernateException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated OperationalContext should cover this overload I believe
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
void persist(String entityName, Object object, PersistContext createdAlready) throws HibernateException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated OperationalContext should cover this overload I believe
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
void persistOnFlush(String entityName, Object object, PersistContext copiedAlready);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated OperationalContext should cover this overload I believe
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
void removeOrphanBeforeUpdates(String entityName, Object child);
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
default SessionImplementor asSessionImplementor() {
|
default SessionImplementor asSessionImplementor() {
|
||||||
return this;
|
return this;
|
||||||
|
|
|
@ -42,6 +42,7 @@ public interface EventSource extends SessionImplementor {
|
||||||
* Cascade merge an entity instance
|
* Cascade merge an entity instance
|
||||||
*/
|
*/
|
||||||
void merge(String entityName, Object object, MergeContext copiedAlready) throws HibernateException;
|
void merge(String entityName, Object object, MergeContext copiedAlready) throws HibernateException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cascade persist an entity instance
|
* Cascade persist an entity instance
|
||||||
*/
|
*/
|
||||||
|
@ -51,19 +52,22 @@ public interface EventSource extends SessionImplementor {
|
||||||
* Cascade persist an entity instance during the flush process
|
* Cascade persist an entity instance during the flush process
|
||||||
*/
|
*/
|
||||||
void persistOnFlush(String entityName, Object object, PersistContext copiedAlready);
|
void persistOnFlush(String entityName, Object object, PersistContext copiedAlready);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cascade refresh an entity instance
|
* Cascade refresh an entity instance
|
||||||
*/
|
*/
|
||||||
void refresh(String entityName, Object object, RefreshContext refreshedAlready) throws HibernateException;
|
void refresh(String entityName, Object object, RefreshContext refreshedAlready) throws HibernateException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cascade delete an entity instance
|
* Cascade delete an entity instance
|
||||||
*/
|
*/
|
||||||
void delete(String entityName, Object child, boolean isCascadeDeleteEnabled, DeleteContext transientEntities);
|
void delete(String entityName, Object child, boolean isCascadeDeleteEnabled, DeleteContext transientEntities);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A specialized type of deletion for orphan removal that must occur prior to queued inserts and updates.
|
* A specialized type of deletion for orphan removal that must occur prior to queued inserts and updates.
|
||||||
*/
|
*/
|
||||||
// TODO: The removeOrphan concept is a temporary "hack" for HHH-6484. This should be removed once action/task
|
// TODO: The removeOrphan concept is a temporary "hack" for HHH-6484.
|
||||||
// ordering is improved.
|
// This should be removed once action/task ordering is improved.
|
||||||
void removeOrphanBeforeUpdates(String entityName, Object child);
|
void removeOrphanBeforeUpdates(String entityName, Object child);
|
||||||
|
|
||||||
Object load(String entityName, Object identifier);
|
Object load(String entityName, Object identifier);
|
||||||
|
|
Loading…
Reference in New Issue