KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > common > ejbs > base > persistencectxlife > ItfPCtxLifetime00


1 /**
2  * EasyBeans
3  * Copyright (C) 2006 Bull S.A.S.
4  * Contact: easybeans@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id: ItfPCtxLifetime00.java 455 2006-05-16 07:29:27Z studzine $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.easybeans.tests.common.ejbs.base.persistencectxlife;
26
27
28 /**
29  * Interface used to test the persistence context lifetime.
30  * @author Eduardo Studzinski Estima de Castro
31  * @author Gisele Pinheiro Souza
32  *
33  */

34 public interface ItfPCtxLifetime00 {
35
36     /**
37      * Initialize the entity manager.
38      */

39     void initEntityManager();
40
41     /**
42      * Creates an entity, persist and check if it is still managed.
43      */

44     void createCheckEntity00();
45
46     /**
47      * Creates an entity and check contains, it should not be managed.
48      * The method has a "not supported" transaction attribute.
49      */

50     void createCheckEntity01();
51
52     /**
53      * Checks if an entity is contained in the entity manager.
54      * @return true if exists
55      */

56     boolean containsEntity();
57
58     /**
59      * Checks if an entity exists.
60      * @return true if exists
61      */

62     boolean existsEntity();
63
64     /**
65      * Checks the persistence context with contains and find methods.
66      */

67     void checkManaged();
68
69     /**
70      * Checks the persistence context with contains and find methods.
71      */

72     void checkDetached();
73
74     /**
75      * Removes the entity.
76      */

77     void removeEntity();
78
79     /**
80      * Persist the entity.
81      */

82     void persistEntity();
83 }
84
Popular Tags