01: //$Id: EventSource.java 9944 2006-05-24 21:14:56Z steve.ebersole@jboss.com $
02: package org.hibernate.event;
03:
04: import java.io.Serializable;
05: import java.util.Map;
06: import java.util.Set;
07:
08: import org.hibernate.HibernateException;
09: import org.hibernate.Session;
10: import org.hibernate.engine.ActionQueue;
11: import org.hibernate.engine.EntityEntry;
12: import org.hibernate.engine.SessionImplementor;
13: import org.hibernate.persister.entity.EntityPersister;
14:
15: /**
16: * @author Gavin King
17: */
18: public interface EventSource extends SessionImplementor, Session {
19:
20: /**
21: * Get the ActionQueue for this session
22: */
23: public ActionQueue getActionQueue();
24:
25: /**
26: * Instantiate an entity instance, using either an interceptor,
27: * or the given persister
28: */
29: public Object instantiate(EntityPersister persister, Serializable id)
30: throws HibernateException;
31:
32: /**
33: * Force an immediate flush
34: */
35: public void forceFlush(EntityEntry e) throws HibernateException;
36:
37: /**
38: * Cascade merge an entity instance
39: */
40: public void merge(String entityName, Object object,
41: Map copiedAlready) throws HibernateException;
42:
43: /**
44: * Cascade persist an entity instance
45: */
46: public void persist(String entityName, Object object,
47: Map createdAlready) throws HibernateException;
48:
49: /**
50: * Cascade persist an entity instance during the flush process
51: */
52: public void persistOnFlush(String entityName, Object object,
53: Map copiedAlready);
54:
55: /**
56: * Cascade refesh an entity instance
57: */
58: public void refresh(Object object, Map refreshedAlready)
59: throws HibernateException;
60:
61: /**
62: * Cascade copy an entity instance
63: */
64: public void saveOrUpdateCopy(String entityName, Object object,
65: Map copiedAlready) throws HibernateException;
66:
67: /**
68: * Cascade delete an entity instance
69: */
70: public void delete(String entityName, Object child,
71: boolean isCascadeDeleteEnabled, Set transientEntities);
72:
73: }
|