KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > jtests > beans > relation > omb > ARemote


1 /*
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@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: ARemote.java,v 1.4 2004/03/15 15:02:35 joaninh Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.jonas.jtests.beans.relation.omb;
27
28 import java.util.Collection JavaDoc;
29 import java.rmi.RemoteException JavaDoc;
30 import javax.ejb.CreateException JavaDoc;
31 import javax.ejb.EJBObject JavaDoc;
32 import javax.ejb.FinderException JavaDoc;
33
34 /**
35  * @author S.Chassande-Barrioz, Helene Joanin, Philippe Durieux
36  */

37 public interface ARemote extends EJBObject JavaDoc {
38
39     String JavaDoc getId() throws RemoteException JavaDoc;
40
41     /**
42      * It replaces the referenced elements of the relation by the element of the
43      * collection specified.
44      * This method has the transactional attribut TX_SUPPORTS.
45      * @param c is a collection of the primary key of the bean 'B'. Then the
46      * elements are java.lang.String objects.
47      * @throw a FinderException if among the collection a primary key does not
48      * match to a bean.
49      */

50     void assignB(Collection JavaDoc c) throws FinderException JavaDoc, RemoteException JavaDoc;
51
52     /**
53      * It replaces the referenced elements of the relation by the element of the
54      * collection specified.
55      * This method has the transactional attribut TX_REQUIRES_NEW.
56      * @param c is a collection of the primary key of the bean 'B'. Then the
57      * elements are java.lang.String objects.
58      * @throw a FinderException if among the collection a primary key does not
59      * match to a bean.
60      */

61     void assignBInNewTx(Collection JavaDoc c) throws FinderException JavaDoc, RemoteException JavaDoc;
62
63
64     /**
65      * It returns the primary key of the referenced elements.
66      * This method has the transactional attribut TX_SUPPORTS.
67      * @return a collection of the primary key of the bean 'B'. Then the
68      * elements are java.lang.String objects.
69      */

70     Collection JavaDoc retrieveB() throws RemoteException JavaDoc;
71
72     /**
73      * It returns the primary key of the referenced elements.
74      * @return a collection of the primary key of the bean 'B'. Then the
75      * elements are java.lang.String objects.
76      * Same as retrieveB, but the implementation differs.
77      */

78     Collection JavaDoc retrieveBisB() throws RemoteException JavaDoc;
79
80     /**
81      * It returns the primary key of the referenced elements.
82      * This method has the transactional attribut TX_REQUIRES_NEW.
83      * @return a collection of the primary key of the bean 'B'. Then the
84      * elements are java.lang.String objects.
85      */

86     Collection JavaDoc retrieveBInNewTx() throws RemoteException JavaDoc;
87
88
89     /**
90      * It adds in the multivalued relation the bean B defined by the primary
91      * keys specified by the parameter.
92      * This method has the transactional attribut TX_SUPPORTS.
93      * @throw a FinderException if the primary key does not match to a bean.
94      */

95     void addAllInB(Collection JavaDoc pkbs) throws FinderException JavaDoc, RemoteException JavaDoc;
96
97     /**
98      * It adds in the multivalued relation the beans B defined by the primary
99      * keys specified by the parameter.
100      * This method has the transactional attribut TX_REQUIRES_NEW.
101      * @throw a FinderException if the primary key does not match to a bean.
102      */

103     void addAllInBInNewTx(Collection JavaDoc pkbs) throws FinderException JavaDoc, RemoteException JavaDoc;
104
105
106     /**
107      * It adds in the multivalued relation the bean B defined by its primary
108      * key specified by the parameter.
109      * This method has the transactional attribut TX_SUPPORTS.
110      * @throw a FinderException if the primary key does not match to a bean.
111      */

112     void addInB(String JavaDoc pkb) throws FinderException JavaDoc, RemoteException JavaDoc;
113
114     /**
115      * It adds in the multivalued relation the bean B defined by its primary
116      * key specified by the parameter.
117      * This method has the transactional attribut TX_REQUIRES_NEW.
118      * @throw a FinderException if the primary key does not match to a bean.
119      */

120     void addInBInNewTx(String JavaDoc pkb) throws FinderException JavaDoc, RemoteException JavaDoc;
121
122     /**
123      * Creates a new B and add it to the B list of A.
124      */

125     void addNewB(String JavaDoc pkb) throws CreateException JavaDoc, FinderException JavaDoc, RemoteException JavaDoc;
126
127     /**
128      * It removes from the multivalued relation the bean B defined by its primary
129      * key specified by the parameter.
130      * This method has the transactional attribut TX_SUPPORTS.
131      * @throw a FinderException if the primary key does not match to a bean.
132      */

133     void removeFromB(String JavaDoc pkb) throws FinderException JavaDoc, RemoteException JavaDoc;
134
135     /**
136      * It removes from the multivalued relation the bean B defined by its primary
137      * key specified by the parameter.
138      * This method has the transactional attribut TX_REQUIRES_NEW.
139      * @throw a FinderException if the primary key does not match to a bean.
140      */

141     void removeFromBInNewTx(String JavaDoc pkb) throws FinderException JavaDoc, RemoteException JavaDoc;
142
143
144     /**
145      * It clear the multivalued relation
146      * This method has the transactional attribut TX_SUPPORTS.
147      */

148     void clearB() throws RemoteException JavaDoc;
149
150     /**
151      * It clear the multivalued relation
152      * This method has the transactional attribut TX_REQUIRES_NEW.
153      */

154     void clearBInNewTx() throws RemoteException JavaDoc;
155
156     /**
157      * It returns true the multivalued relation contains all the bean B defined
158      * by the primary keys specified by the parameter.
159      * This method has the transactional attribut TX_SUPPORTS.
160      * @throw a FinderException if a primary key does not match to a bean.
161      */

162     boolean containAllInB(Collection JavaDoc pkbs) throws FinderException JavaDoc, RemoteException JavaDoc;
163
164
165     /**
166      * It returns true the multivalued relation contains the bean B defined
167      * by the primary key specified by the parameter.
168      * This method has the transactional attribut TX_SUPPORTS.
169      * @throw a FinderException if the primary key does not match to a bean.
170      */

171     boolean containInB(String JavaDoc pkb) throws FinderException JavaDoc, RemoteException JavaDoc;
172
173     /**
174      * This method check it isn't allowed to reset the pk.
175      * It returns true if the test is ok.
176      * See spec 2.0, chapter 10.3.5, page 134
177      */

178     boolean testResetPkForbidden(String JavaDoc pka) throws RemoteException JavaDoc;
179
180 }
181
Popular Tags