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: ARemote.java 1090 2002-12-24 13:43:33Z durieuxp $
023: * --------------------------------------------------------------------------
024: */
025:
026: package org.objectweb.jonas.jtests.beans.relation.mnu;
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 ARemote extends EJBObject {
037:
038: String getId() throws RemoteException;
039:
040: /**
041: * It replaces the referenced elements of the relation by the element of the
042: * collection specified.
043: * This method has the transactional attribut TX_SUPPORTS.
044: * @param c is a collection of the primary key of the bean 'B'. Then the
045: * elements are java.lang.String objects.
046: * @throw a FinderException if among the collection a primary key does not
047: * match to a bean.
048: */
049: void assignB(Collection c) throws FinderException, RemoteException;
050:
051: /**
052: * It replaces the referenced elements of the relation by the element of the
053: * collection specified.
054: * This method has the transactional attribut TX_REQUIRES_NEW.
055: * @param c is a collection of the primary key of the bean 'B'. Then the
056: * elements are java.lang.String objects.
057: * @throw a FinderException if among the collection a primary key does not
058: * match to a bean.
059: */
060: void assignBInNewTx(Collection c) throws FinderException,
061: RemoteException;
062:
063: /**
064: * It returns the primary key of the referenced elements.
065: * This method has the transactional attribut TX_SUPPORTS.
066: * @return a collection of the primary key of the bean 'B'. Then the
067: * elements are java.lang.String objects.
068: */
069: Collection retrieveB() throws RemoteException;
070:
071: /**
072: * It returns the primary key of the referenced elements.
073: * This method has the transactional attribut TX_REQUIRES_NEW.
074: * @return a collection of the primary key of the bean 'B'. Then the
075: * elements are java.lang.String objects.
076: */
077: Collection retrieveBInNewTx() throws RemoteException;
078:
079: /**
080: * It adds in the multivalued relation the bean B defined by the primary
081: * keys specified by the parameter.
082: * This method has the transactional attribut TX_SUPPORTS.
083: * @throw a FinderException if the primary key does not match to a bean.
084: */
085: void addAllInB(Collection pkbs) throws FinderException,
086: RemoteException;
087:
088: /**
089: * It adds in the multivalued relation the beans B defined by the primary
090: * keys specified by the parameter.
091: * This method has the transactional attribut TX_REQUIRES_NEW.
092: * @throw a FinderException if the primary key does not match to a bean.
093: */
094: void addAllInBInNewTx(Collection pkbs) throws FinderException,
095: RemoteException;
096:
097: /**
098: * It adds in the multivalued relation the bean B defined by its primary
099: * key specified by the parameter.
100: * This method has the transactional attribut TX_SUPPORTS.
101: * @throw a FinderException if the primary key does not match to a bean.
102: */
103: void addInB(String pkb) throws FinderException, RemoteException;
104:
105: /**
106: * It adds in the multivalued relation the bean B defined by its primary
107: * key specified by the parameter.
108: * This method has the transactional attribut TX_REQUIRES_NEW.
109: * @throw a FinderException if the primary key does not match to a bean.
110: */
111: void addInBInNewTx(String pkb) throws FinderException,
112: RemoteException;
113:
114: /**
115: * It removes from the multivalued relation the bean B defined by its primary
116: * key specified by the parameter.
117: * This method has the transactional attribut TX_SUPPORTS.
118: * @throw a FinderException if the primary key does not match to a bean.
119: */
120: void removeFromB(String pkb) throws FinderException,
121: RemoteException;
122:
123: /**
124: * It removes from the multivalued relation the bean B defined by its primary
125: * key specified by the parameter.
126: * This method has the transactional attribut TX_REQUIRES_NEW.
127: * @throw a FinderException if the primary key does not match to a bean.
128: */
129: void removeFromBInNewTx(String pkb) throws FinderException,
130: RemoteException;
131:
132: /**
133: * It clear the multivalued relation
134: * This method has the transactional attribut TX_SUPPORTS.
135: */
136: void clearB() throws RemoteException;
137:
138: /**
139: * It clear the multivalued relation
140: * This method has the transactional attribut TX_REQUIRES_NEW.
141: */
142: void clearBInNewTx() throws RemoteException;
143:
144: /**
145: * It returns true the multivalued relation contains all the bean B defined
146: * by the primary keys specified by the parameter.
147: * This method has the transactional attribut TX_SUPPORTS.
148: * @throw a FinderException if a primary key does not match to a bean.
149: */
150: boolean containAllInB(Collection pkbs) throws FinderException,
151: RemoteException;
152:
153: /**
154: * It returns true the multivalued relation contains the bean B defined
155: * by the primary key specified by the parameter.
156: * This method has the transactional attribut TX_SUPPORTS.
157: * @throw a FinderException if the primary key does not match to a bean.
158: */
159: boolean containInB(String pkb) throws FinderException,
160: RemoteException;
161: }
|