Hi,

I have web-app being built to run within a jboss304+tomcat406 environment.

I have a session facade whose responsibilty it is, amongst others, to take a searchCriteriaVO (value object) and use it to select a particular finder.

Now, I know that one could take those criteria and take every possible combination of criteria and apply it to a single finder - one finder per unique combination of criteria but, to me this seems like a lot of hard work.

It looks as though one could write code to dynamically construct an sql statement which would be quicker and easier than constructing code to select a finder but I'm thinking maybe there's a way using ejb-ql to do this stuff more dynamically.

Here's an example scenario.

I am searching for cars:

searchCriteriaVO has
engineType (all,1, 2 ,3)
condition (any,good, fair, poor)
registrationFromDate (could be null)
registrationToDate(could be null)

The above criteria could produce a fairly large number of unique combinations and thus that same number of finders.

Whats the best or easiest way to code this? Is there a 'best practice' which I need to know about?
(I have a cars entity bean and a cars session facade)

thanks
jim




-------------------------------------------------------
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information by implementing
SSL on your Apache Web Server. Click here to get our FREE Thawte Apache Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to