001: /*
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 1999 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id: BRemote.java 1089 2002-12-24 13:37:47Z durieuxp $
023: * --------------------------------------------------------------------------
024: */
025:
026: package org.objectweb.jonas.jtests.beans.relation.mnb;
027:
028: import java.util.Collection;
029: import java.rmi.RemoteException;
030: import javax.ejb.EJBObject;
031: import javax.ejb.FinderException;
032:
033: /**
034: * @author S.Chassande-Barrioz
035: */
036: public interface BRemote extends EJBObject {
037:
038: String getId() throws RemoteException;
039:
040: void m1() throws RemoteException;
041:
042: /**
043: * It replaces the referenced elements of the relation by the element of the
044: * collection specified.
045: * This method has the transactional attribut TX_SUPPORTS.
046: * @param c is a collection of the primary key of the bean 'A'. Then the
047: * elements are java.lang.String objects.
048: * @throw a FinderException if among the collection a primary key does not
049: * match to a bean.
050: */
051: void assignA(Collection c) throws FinderException, RemoteException;
052:
053: /**
054: * It replaces the referenced elements of the relation by the element of the
055: * collection specified.
056: * This method has the transactional attribut TX_REQUIRES_NEW.
057: * @param c is a collection of the primary key of the bean 'A'. Then the
058: * elements are java.lang.String objects.
059: * @throw a FinderException if among the collection a primary key does not
060: * match to a bean.
061: */
062: void assignAInNewTx(Collection c) throws FinderException,
063: RemoteException;
064:
065: /**
066: * It returns the primary key of the referenced elements.
067: * This method has the transactional attribut TX_SUPPORTS.
068: * @return a collection of the primary key of the bean 'A'. Then the
069: * elements are java.lang.String objects.
070: */
071: Collection retrieveA() throws RemoteException;
072:
073: /**
074: * It returns the primary key of the referenced elements.
075: * This method has the transactional attribut TX_REQUIRES_NEW.
076: * @return a collection of the primary key of the bean 'A'. Then the
077: * elements are java.lang.String objects.
078: */
079: Collection retrieveAInNewTx() throws RemoteException;
080:
081: /**
082: * It adds in the multivalued relation the bean A defined by the primary
083: * keys specified by the parameter.
084: * This method has the transactional attribut TX_SUPPORTS.
085: * @throw a FinderException if the primary key does not match to a bean.
086: */
087: void addAllInA(Collection pkbs) throws FinderException,
088: RemoteException;
089:
090: /**
091: * It adds in the multivalued relation the beans A defined by the primary
092: * keys specified by the parameter.
093: * This method has the transactional attribut TX_REQUIRES_NEW.
094: * @throw a FinderException if the primary key does not match to a bean.
095: */
096: void addAllInAInNewTx(Collection pkbs) throws FinderException,
097: RemoteException;
098:
099: /**
100: * It adds in the multivalued relation the bean A defined by its primary
101: * key specified by the parameter.
102: * This method has the transactional attribut TX_SUPPORTS.
103: * @throw a FinderException if the primary key does not match to a bean.
104: */
105: void addInA(String pkb) throws FinderException, RemoteException;
106:
107: /**
108: * It adds in the multivalued relation the bean A defined by its primary
109: * key specified by the parameter.
110: * This method has the transactional attribut TX_REQUIRES_NEW.
111: * @throw a FinderException if the primary key does not match to a bean.
112: */
113: void addInAInNewTx(String pkb) throws FinderException,
114: RemoteException;
115:
116: /**
117: * It removes from the multivalued relation the bean A defined by its primary
118: * key specified by the parameter.
119: * This method has the transactional attribut TX_SUPPORTS.
120: * @throw a FinderException if the primary key does not match to a bean.
121: */
122: void removeFromA(String pkb) throws FinderException,
123: RemoteException;
124:
125: /**
126: * It removes from the multivalued relation the bean A defined by its primary
127: * key specified by the parameter.
128: * This method has the transactional attribut TX_REQUIRES_NEW.
129: * @throw a FinderException if the primary key does not match to a bean.
130: */
131: void removeFromAInNewTx(String pkb) throws FinderException,
132: RemoteException;
133:
134: /**
135: * It clear the multivalued relation
136: * This method has the transactional attribut TX_SUPPORTS.
137: */
138: void clearA() throws RemoteException;
139:
140: /**
141: * It clear the multivalued relation
142: * This method has the transactional attribut TX_REQUIRES_NEW.
143: */
144: void clearAInNewTx() throws RemoteException;
145:
146: /**
147: * It returns true the multivalued relation contains all the bean A defined
148: * by the primary keys specified by the parameter.
149: * This method has the transactional attribut TX_SUPPORTS.
150: * @throw a FinderException if a primary key does not match to a bean.
151: */
152: boolean containAllInA(Collection pkbs) throws FinderException,
153: RemoteException;
154:
155: /**
156: * It returns true the multivalued relation contains the bean A defined
157: * by the primary key specified by the parameter.
158: * This method has the transactional attribut TX_SUPPORTS.
159: * @throw a FinderException if the primary key does not match to a bean.
160: */
161: boolean containInA(String pkb) throws FinderException,
162: RemoteException;
163:
164: }
|