KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > action > Executable


1 //$Id: Executable.java,v 1.5 2005/04/29 15:26:10 oneovthafew Exp $
2
package org.hibernate.action;
3
4 import org.hibernate.HibernateException;
5
6 import java.io.Serializable JavaDoc;
7
8 /**
9  * An operation which may be scheduled for later execution.
10  * Usually, the operation is a database insert/update/delete,
11  * together with required second-level cache management.
12  *
13  * @author Gavin King
14  */

15 public interface Executable {
16     /**
17      * Called before executing any actions
18      */

19     public void beforeExecutions() throws HibernateException;
20     /**
21      * Execute this action
22      */

23     public void execute() throws HibernateException;
24     /**
25      * Do we need to retain this instance until after the
26      * transaction completes?
27      * @return false if this class defines a no-op
28      * <tt>hasAfterTransactionCompletion()</tt>
29      */

30     public boolean hasAfterTransactionCompletion();
31     /**
32      * Called after the transaction completes
33      */

34     public void afterTransactionCompletion(boolean success) throws HibernateException;
35     /**
36      * What spaces (tables) are affected by this action?
37      */

38     public Serializable JavaDoc[] getPropertySpaces();
39 }
40
Popular Tags