I'm generally not a fan o of finders, so my thoght would be to have a session
bean that can take a collection of parms, parse that collection and use it to
compose an SQL statement, and submit that, ignoring the Entity ean altogether.
I think entity beans have good uses, but I don't think this is necessarily one,.


  Ken Litwak

>Hi,
> I have an app that is going to have very intricate search capabilities. It is
using CMP2.0. How would I implement finders in the system if I had for instance
20 attributes for an entity, and the search could be any combination of the 20
attributes?(ie an item has price, age, weight and i want price >$20, age <50
years, weight == 10 pounds). Would I need to create a specific finder for this
ie
>
>public Collection findByPriceANDAgeANDWeight(Float Price, int Age, int Weight)
throws RemoteException, FinderException;
>
>and so on for every permutation (n^2 finders!?!?!?!) This seems a bit
ridiculous. Somebody please help, it almost makes me scared of using EJBs for
this purpose, becuase I could more easily create a custom finder in a normal
JDBC client that appends SQL contraints like WHERE Price > 20. Is there a way to
do this better in EJB (maybe a dynamic FindStatement?) similar to my JDBC client
way?
>
>Warmest Regards,
>Eric Dunn
>[EMAIL PROTECTED]
>
>===========================================================================
>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