Hi Dave,

Personally I would prefer to treat relationship as a serializable class i.e.
RelationshipType. The RelationshipType class would have methods for
accessing the set of values and possibly converting from String to
RelationshipType and vice versa. The RelationshipType class would allow type
checking in your parameter lists. There is a good article in this months
JavaReport discussing some of this.

Patterns in Java
Value added
Kevlin Henney
Calculating and storing amounts is a typical requirement of software. Value
objects represent the simple, granular pieces of information you find in a
system: strings, dates, money, dimensions, colors, etc. Kevlin spotlights
each pattern in a brief problem solution format to reveal more detail.

kind regards,

William Louth

> -----Original Message-----
> From: DaveFord [SMTP:[EMAIL PROTECTED]]
> Sent: Sunday, April 09, 2000 8:42 PM
> To:   [EMAIL PROTECTED]
> Subject:      Static Methods
>
> Since static methods are not allowed in EJB. How would you recommend I
> implement the "getPossibleRelationships()" method as shown below:
>
>
> public class Company{
>
>   public String getName();
>   public Address getAddress();
>   public String getRelationship();
>
>   /* returns Customer, Vendor, Competitor, Other */
>   public static String[] getPossibleRelationships();
>
> }
>
> Thanks,
>
> Dave Ford
>
> ==========================================================================
> =
> 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".


***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***********************************************************************

===========================================================================
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