001package edu.pdx.cs410J.family;
002
003import java.rmi.*;
004import java.util.*;
005
006/**
007 * This interface models a {@link edu.pdx.cs410J.family.Person}
008 * that is accessed remotely using Java Remote Method Invocation.
009 */
010public interface RemotePerson extends Remote {
011
012  /**
013   * Returns this person's unique id
014   */
015  public int getId() throws RemoteException;
016
017  /**
018   * Returns this person's gender (either {@link
019   * edu.pdx.cs410J.family.Person#MALE} or
020   * {@link edu.pdx.cs410J.family.Person#FEMALE}.
021   */
022  public Person.Gender getGender() throws RemoteException;
023
024//   /**
025//    * Sets this person's gender
026//    */
027//   public void setGender(int gender) throws RemoteException;
028
029  /**
030   * Returns this person's first name
031   */
032  public String getFirstName() throws RemoteException;
033
034  /**
035   * Sets this person's first name
036   */
037  public void setFirstName(String firstName) throws RemoteException;
038
039  /**
040   * Returns this person's middle name
041   */
042  public String getMiddleName() throws RemoteException;
043
044  /**
045   * Sets this person's middle name
046   */
047  public void setMiddleName(String middleName) throws RemoteException;
048
049  /**
050   * Returns this person's last name
051   */
052  public String getLastName() throws RemoteException;
053
054  /**
055   * Sets this person's last name
056   */
057  public void setLastName(String lastName) throws RemoteException;
058
059  /**
060   * Returns the id of this person's father
061   */
062  public int getFatherId() throws RemoteException;
063
064  /**
065   * Sets the id of this person's father
066   *
067   * @throws FamilyTreeException
068   *        The person with the given id cannot be found or the person
069   *        with that id is not {@link Person#MALE}
070   */
071  public void setFatherId(int fatherId) throws RemoteException;
072
073  /**
074   * Returns the id of this person's mother
075   */
076  public int getMotherId() throws RemoteException;
077
078  /**
079   * Sets the id of this person's mother
080   *
081   * @throws FamilyTreeException
082   *        The person with the given id cannot be found or the person
083   *        with that id is not {@link Person#FEMALE}
084   */
085  public void setMotherId(int motherId) throws RemoteException;
086
087//   /**
088//    * Returns the marriages that this person has been involved in
089//    */
090//   public Collection getMarriages() throws RemoteException;
091
092  /**
093   * Returns this person's date of birth
094   */
095  public Date getDateOfBirth() throws RemoteException;
096
097  /**
098   * Sets this person's date of birth
099   */
100  public void setDateOfBirth(Date dob) throws RemoteException;
101
102  /**
103   * Returns this person's date of death
104   */
105  public Date getDateOfDeath() throws RemoteException;
106
107  /**
108   * Sets this person's date of death
109   */
110  public void setDateOfDeath(Date dod) throws RemoteException;
111
112  /**
113   * Returns a string describing this person
114   */
115  public String getDescription() throws RemoteException;
116
117}
118