> +----------------+      +----------------+      +-------------+
> |     person     |      |     phone      |      | phone_type  |
> +----------------+      +----------------+      +-------------+
> | id (pk)        | <-+  | id (pk)        |  +-> | id          |
> | firstname      |   +- | person         |  |   | descr       |
> | lastname       |      | type           | -+   +-------------+
> +----------------+      | number         |
>                         | priority
>                         | remarks        |
>                       +----------------+


You can write 3 CMP entity beans (with local interfaces, of course). CMP
beans can have relations like 1-n and 1-1.


> 

> void addPerson(Integer id, String firtname, String lastname)

>Person[] findByName(String name)
> 
> 
> Sting getPersonFirstName(Integer id);

> Sting getPersonLastName(Integer id);
> 
> int getPersonPhoneEntriesCount(); // 

> void addPersonPhone(Person p, Interger id, String number, ...)

> String[] getPersonPhoneNumber()  
> 
> String[] getPhoneTypes();

> 
> but i can't belive that i have to implement _all_ of the 
> possible access
> methods to implement a full featured address management. 
> there should be
> a much better way to make the above work!?

You should implement those methods, of course.

Except  findByPrimaryKey(Integer id), its implemented by EJB container.


Maris
> 
> 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to