|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RemoteFamilyTree
This interface specifies a factory that is responsible for creating,
storing and querying Person objects.
| Method Summary | |
|---|---|
RemoteMarriage |
createMarriage(int husbandId,
int wifeId)
Creates a new marriage between two people |
RemotePerson |
createPerson(Person.Gender gender)
Creates a new Person of a given gender |
Collection<RemotePerson> |
getLiving()
Returns the people in the family tree that are living (i.e. have a date of birth, but no date of death) |
Collection<RemotePerson> |
getLiving(Date date)
Returns the people in the family tree were alive at a certain time |
RemoteMarriage |
getMarriage(int husbandId,
int wifeId)
Returns the marriage between two people. |
RemotePerson |
getPerson(int id)
Gets the person with the given id. |
RemotePerson |
getPerson(String firstName,
String lastName)
Gets the person with the given first and last name. |
void |
shutdown()
Shuts down this PersonFactory. |
| Method Detail |
|---|
RemotePerson createPerson(Person.Gender gender)
throws RemoteException
Person of a given gender
FamilyTreeException - If gender is neither Person.MALE nor
Person.FEMALE.
RemoteException
RemotePerson getPerson(int id)
throws RemoteException
null is returned.
RemoteException
RemotePerson getPerson(String firstName,
String lastName)
throws RemoteException
null is returned.
IllegalArgumentException - If more than one person in the family tree has that
name.
RemoteException
void shutdown()
throws IOException,
RemoteException
PersonFactory. Modified
Persons are written to persistent storage as
appropriate.
IOException
RemoteException
RemoteMarriage getMarriage(int husbandId,
int wifeId)
throws RemoteException
null is returned.
IllegalArgumentException - If no person with husbandId or no person with wifeId
exists in the family tree
RemoteException
RemoteMarriage createMarriage(int husbandId,
int wifeId)
throws RemoteException
IllegalArgumentException - If no person with husbandId or no person with wifeId
exists in the family tree or if either spouse does not
have the proper gender.
RemoteException
Collection<RemotePerson> getLiving()
throws RemoteException
RemoteException
Collection<RemotePerson> getLiving(Date date)
throws RemoteException
RemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||