// PersonRemote.java

package org.objectweb.jonas.jtests.beans.relation.rcycle;

import java.util.Collection;

import java.rmi.RemoteException;
import javax.ejb.EJBObject;
import javax.ejb.FinderException;


/**
 * Person remote interface
 * @author H.Joanin
 */
public interface PersonRemote extends EJBObject {

    Integer getId() throws RemoteException;

    String getName() throws RemoteException;
    void setName(String name) throws RemoteException;

    int getSex() throws RemoteException;
    void setSex(int sex) throws RemoteException;

    Integer retrieveSpouse() throws RemoteException;
    void assignSpouse(Integer idSpouse) throws FinderException, RemoteException;

    Collection retrieveParents() throws RemoteException;
    void assignParents(Collection idParents) throws FinderException, RemoteException;
    void addInParents(Integer idParents) throws FinderException,RemoteException;

    Collection retrieveChildren() throws RemoteException;
    void assignChildren(Collection idChildren) throws FinderException, RemoteException;
    void addInChildren(Integer idChild) throws FinderException, RemoteException;
    Collection retrieveChildrenNames() throws RemoteException;

    Integer retrieveGuardian() throws RemoteException;
    void assignGuardian(Integer idGuardian) throws FinderException, RemoteException;

    Collection retrieveGuardianOf() throws RemoteException;
    void assignInGuardianOf(Collection ids) throws FinderException, RemoteException;
    void addInGuardianOf(Integer id) throws FinderException, RemoteException;

    boolean testCmrNull() throws FinderException, RemoteException;

}
