KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > event > EventSource


1 //$Id: EventSource.java,v 1.2 2005/07/15 03:35:18 oneovthafew Exp $
2
package org.hibernate.event;
3
4 import java.io.Serializable JavaDoc;
5 import java.util.Map JavaDoc;
6
7 import org.hibernate.HibernateException;
8 import org.hibernate.Session;
9 import org.hibernate.engine.ActionQueue;
10 import org.hibernate.engine.EntityEntry;
11 import org.hibernate.engine.SessionImplementor;
12 import org.hibernate.persister.entity.EntityPersister;
13
14 /**
15  * @author Gavin King
16  */

17 public interface EventSource extends SessionImplementor, Session {
18     
19     /**
20      * Get the ActionQueue for this session
21      */

22     public ActionQueue getActionQueue();
23
24     /**
25      * Instantiate an entity instance, using either an interceptor,
26      * or the given persister
27      */

28     public Object JavaDoc instantiate(EntityPersister persister, Serializable JavaDoc id) throws HibernateException;
29
30     /**
31      * Force an immediate flush
32      */

33     public void forceFlush(EntityEntry e) throws HibernateException;
34
35     /**
36      * Cascade merge an entity instance
37      */

38     public void merge(String JavaDoc entityName, Object JavaDoc object, Map JavaDoc copiedAlready) throws HibernateException;
39     /**
40      * Cascade persist an entity instance
41      */

42     public void persist(String JavaDoc entityName, Object JavaDoc object, Map JavaDoc createdAlready) throws HibernateException;
43     /**
44      * Cascade refesh an entity instance
45      */

46     public void refresh(Object JavaDoc object, Map JavaDoc refreshedAlready) throws HibernateException;
47     /**
48      * Cascade copy an entity instance
49      */

50     public void saveOrUpdateCopy(String JavaDoc entityName, Object JavaDoc object, Map JavaDoc copiedAlready) throws HibernateException;
51     
52     /**
53      * Cascade delete an entity instance
54      */

55     public void delete(String JavaDoc entityName, Object JavaDoc child, boolean isCascadeDeleteEnabled);
56
57 }
58
Popular Tags