Project 3 - People
You must implement, deploy and test entity and session beans that implement
the following functionality.
PersonBean
A entity bean using CMP 2.0 persistence and local interfaces.
You must represent the following
abstract fields: PersonId, Name, Money. You must also represent
the following CMR: Spouse, Knows. Spouse is an optional 1:1 relationship,
Knows is a many-to-many. Note that Spouse should be symettric, while Knows
will not be (and we will not provide mechanisms for determining
who knows you).
PeopleBean
A stateless session bean using remote interfaces.
Provide the following functionality/business methods:
void createPerson(Integer id, String name, int money)
Integer findPerson(String name)
String getName(Integer id)
Integer getSpouse(Integer id)
Integer getMoney(Integer id)
void giveMoney(Integer from, Integer to, int amount)
void marry(Integer p1, Integer p2)
void divorce(Integer p1, Integer p2)
boolean getToKnow(Integer p1, Integer p2)
boolean forget(Integer p1, Integer p2)
Set knows(Integer p1)
along with any others you think appropriate.
These methods have been written to use a person's primary key. You may use
an alternative implementation if you wish (perhaps using a value object
for a person).