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 1298 2003-01-24 08:31:40Z chassand $
023: * --------------------------------------------------------------------------
024: */
025:
026: package org.objectweb.jonas.jtests.beans.relation.pkcomp;
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 J.Camilleri
035: */
036: public interface BRemote extends EJBObject {
037:
038: BPK 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(APK pka) 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(APK pka) throws FinderException, RemoteException;
114:
115: /**
116: * It removes from the multivalued relation the bean A defined by its primary
117: * key specified by the parameter.
118: * This method has the transactional attribut TX_SUPPORTS.
119: * @throw a FinderException if the primary key does not match to a bean.
120: */
121: void removeFromA(APK pka) throws FinderException, RemoteException;
122:
123: /**
124: * It removes from the multivalued relation the bean A 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 removeFromAInNewTx(APK pka) throws FinderException,
130: RemoteException;
131:
132: /**
133: * It clear the multivalued relation
134: * This method has the transactional attribut TX_SUPPORTS.
135: */
136: void clearA() throws RemoteException;
137:
138: /**
139: * It clear the multivalued relation
140: * This method has the transactional attribut TX_REQUIRES_NEW.
141: */
142: void clearAInNewTx() throws RemoteException;
143:
144: /**
145: * It returns true the multivalued relation contains all the bean A 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 containAllInA(Collection pkbs) throws FinderException,
151: RemoteException;
152:
153: /**
154: * It returns true the multivalued relation contains the bean A 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 containInA(APK pka) throws FinderException, RemoteException;
160:
161: }
|