KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > entityexc > interfaces > EntityExcHome


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package org.jboss.test.entityexc.interfaces;
23
24 import java.util.Collection JavaDoc;
25
26 import java.rmi.RemoteException JavaDoc;
27
28 import javax.ejb.EJBHome JavaDoc;
29 import javax.ejb.CreateException JavaDoc;
30 import javax.ejb.FinderException JavaDoc;
31
32 /**
33  * Home interface of the entity exception test bean.
34  *
35  * @author <a HREF="mailto:osh@sparre.dk">Ole Husgaard</a>
36  * @version $Revision: 37406 $
37  */

38 public interface EntityExcHome extends EJBHome JavaDoc
39 {
40   /**
41    * JNDI name of this home.
42    */

43   public final String JavaDoc JNDI_NAME = "EntityExc";
44
45   /**
46    * Create a new entity instance.
47    */

48   public EntityExc create(Integer JavaDoc id, int flags)
49     throws MyAppException, CreateException JavaDoc, RemoteException JavaDoc;
50
51   /**
52    * Find by primary key.
53    */

54   public EntityExc findByPrimaryKey(Integer JavaDoc key, int flags)
55     throws MyAppException, FinderException JavaDoc, RemoteException JavaDoc;
56  
57   /**
58    * Find all beans in this interface.
59    */

60   public Collection JavaDoc findAll(int flags)
61     throws MyAppException, FinderException JavaDoc, RemoteException JavaDoc;
62  
63   /**
64    * Reset the database to a known state.
65    * This is used for initializing, and should be called after deployment
66    * but before the tests start.
67    * It will create the database table, if it does not exist, or is not
68    * correctly defined.
69    * If the database table is not empty, all records in it will be deleted.
70    */

71   public void resetDatabase()
72     throws RemoteException JavaDoc;
73 }
74
Popular Tags