Hi John
  Thanks for  your detail explanation.

My question is how to implement them.

   Suppose I am creating an entity like say user. In the creation page I
have combo boxes which are to be filled.

I am giving real scenario here. I my application I have customer and
customer contacts and customer locations.

If I take Customer, Contact as entitites. Each entity has a status. So I
have a general table called STATUS.

 Now in JSP - EJB (session, entity) which one will pick the values from the
STATUS table and populate the combo box in the front end. I cant put it in
Customer, Contact beans to get the status values.

I have CustomerStatelessSessionBean, CustomerEntityBean. The same with
Contact entity.

My question is how to get the STATUS values when I displaying the Customer
info page which contains STATUS field, a combo box filled with status
values. Should I have seperate class for that and  what should be the name
of it so that the name tells everything or is there any other way.

Kishore Veleti
----- Original Message -----
From: "John Slaman" <[EMAIL PROTECTED]>
To: "VAVK KISHORE" <[EMAIL PROTECTED]>
Sent: Wednesday, July 25, 2001 1:16 PM
Subject: RE: Design Doubts


>
> What's the differences between the users with respect to attributes and
> behavior?
>
> If there are no attribute differences - you should store them in the same
> table (and provide a field in the table that defines the type).  If you're
> storing them in the same table - you only need one DAO (with perhaps
> sufficient methods to retrieve the appropriate type - and provide
"factory"
> behavior).
>
> If there are significant behavior differences - then you'll want different
> classes (using inheritance) and the field defining the type could use the
> class name.
>
> Alternatively - there are design patterns where you separate the "Role"
out.
> For example: a PERSON can be both a student, teacher and employee at the
> same time; or a PERSON's role may change (from staff to manager). Each
role
> provides different functionality - but all people have the same
attributes:
> name, dob, etc. You don't want to create three different PEOPLE objects.
>
> Without significant discussions - anything you get back from the news
group
> is simply a shot in the dark.
>
> Regards
>
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of VAVK KISHORE
> Sent: Wednesday, July 25, 2001 3:19 PM
> To: [EMAIL PROTECTED]
> Subject: Design Doubts
>
> Hi,
>
>  I am in doubts in how to come out with a good design for this
requirement.
>
> In my application there are types of Users like say INTERNAL_USER /
> PARTNER_USER / END_USER and in future I may have more. New user types are
> added by administrator. Similary I am having References like
> REFERAL_EMPLOYEE / REFEREAL_JOB_SITE / REFEREAL_PARTNER etc.
>
> All these are to be populated in the combo boxes and they are not
entitties
> in the system.
>
> My question is:
> Generally how they are retrieved in JSP - EJB (Session and Entity beans).
>
> Now I am going with   xxxDAO class for each one like say UserTypeDAO,
> RefTypeDAO. These DAO's will insert, update, retrieve the respecitve
types.
> These are not EJB's, ordinary Java classes with sql code for
> create/update/view.
>
> Is this is a good one or are there any other better ways we can achieve
> this.
>
> Thanks in advance
> Kishroe Veleti
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to