[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Factory Method



create a mapping file between your querystring and the classname of the
object, then in your factory retrieve the classname form the mapping and use
reflection to create an instance and return that instance.

hth

Matt

> -----Original Message-----
> From: Kevin O'Neill Stoll [mailto:kevinostoll@yahoo.com]
> Sent: Friday, March 21, 2003 11:10 AM
> To: AJUG
> Subject: Factory Method
>
>
> Hey all,
>
> I have a set of objects that would make a good canidate in
> using the factory method design pattern. The problem I'm
> having at the moment is determining which object to use.
> All of my object extend a super class called SearchBean but
> I determine which form of searchbean to use by passing a
> search-type parameter in from the requesting page.
>
> My question is, how do I convert a querystring parameter
> that identifies the type of search to invoke into an object
> in which a factory method function could use?
>
>
>
> =====
> Kevin Stoll
> http://kevinstoll.com/
>
> OpenSource Software...FREE!
> Angering Bill Gates...priceless.
> ============================================================
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://platinum.yahoo.com
>