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 1485 2003-02-14 15:31:58Z joaninh $
023: * --------------------------------------------------------------------------
024: */
025:
026: package org.objectweb.jonas.jtests.beans.relation.s3pkcomp;
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 H. Joanin
035: */
036: public interface ARemote extends EJBObject {
037:
038: Integer 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(Pk 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(Pk pkb) throws FinderException, RemoteException;
112:
113: /**
114: * It removes from the multivalued relation the bean B defined by its primary
115: * key specified by the parameter.
116: * This method has the transactional attribut TX_SUPPORTS.
117: * @throw a FinderException if the primary key does not match to a bean.
118: */
119: void removeFromB(Pk pkb) throws FinderException, RemoteException;
120:
121: /**
122: * It removes from the multivalued relation the bean B defined by its primary
123: * key specified by the parameter.
124: * This method has the transactional attribut TX_REQUIRES_NEW.
125: * @throw a FinderException if the primary key does not match to a bean.
126: */
127: void removeFromBInNewTx(Pk pkb) throws FinderException,
128: RemoteException;
129:
130: /**
131: * It clear the multivalued relation
132: * This method has the transactional attribut TX_SUPPORTS.
133: */
134: void clearB() throws RemoteException;
135:
136: /**
137: * It clear the multivalued relation
138: * This method has the transactional attribut TX_REQUIRES_NEW.
139: */
140: void clearBInNewTx() throws RemoteException;
141:
142: /**
143: * It returns true the multivalued relation contains all the bean B defined
144: * by the primary keys specified by the parameter.
145: * This method has the transactional attribut TX_SUPPORTS.
146: * @throw a FinderException if a primary key does not match to a bean.
147: */
148: boolean containAllInB(Collection pkbs) throws FinderException,
149: RemoteException;
150:
151: /**
152: * It returns true the multivalued relation contains the bean B defined
153: * by the primary key specified by the parameter.
154: * This method has the transactional attribut TX_SUPPORTS.
155: * @throw a FinderException if the primary key does not match to a bean.
156: */
157: boolean containInB(Pk pkb) throws FinderException, RemoteException;
158: }
|