SV: Dynamic finders

2001-06-11 Thread Magnus Rydin
Title: SV: Dynamic finders





Yes.
If you want to go pure, you could do something like:
a) get them all and then filter them in your code
b) get the largest hit first, then filter them with the collections returned by your other finders (requires one finder per dynamic value of original query). This filterting should probably be located in a Session bean.

c) generate finder methods for all possible queries and have a Session bean select the one you want


Having been in your shoes, I dropped religion and went with tech. :)


WR


 -Ursprungligt meddelande-
 Frn: Dvornikov Victor [mailto:[EMAIL PROTECTED]]
 Skickat: den 10 juni 2001 00:03
 Till: Orion-Interest
 mne: RE: Dynamic finders
 
 
 Although it may be technically correct, but from conceptual database
 modeling point of view the comparison ($1 is null... ) is 
 questionable. 
 
  -Original Message-
  From: Magnus Rydin [SMTP:[EMAIL PROTECTED]]
  Sent: ???  08  2001 14:37
  To: Orion-Interest
  Subject: SV: Dynamic finders
  
  something like 
  .. ($1 is null OR $1=$field) AND ... 
  
   -Ursprungligt meddelande- 
   Fran: Stefan Paun [ mailto:[EMAIL PROTECTED]] 
   Skickat: den 8 juni 2001 07:16 
   Till: Orion-Interest 
   Amne: Dynamic finders 
   
   
   
   
   Does anybody have a solution for implementing a finder that 
   takes some 
   parameters, but searches taking into account only the ones 
   that are not 
   null? 
   Basically, this would be used to support a search page in 
   which the user 
   can choose to fill or not some fields of the search criteria. 
   I know that probably the best way to do this is using a 
   Session Bean and 
   JDBC, but is there a way to implement it using CMP Entity 
 finders (in 
   EJB1.1)? 
   
   Thanks, 
   Stefan 
   
   
  
 





SV: Dynamic finders

2001-06-08 Thread Magnus Rydin
Title: SV: Dynamic finders





something like
.. ($1 is null OR $1=$field) AND ...


 -Ursprungligt meddelande-
 Från: Stefan Paun [mailto:[EMAIL PROTECTED]]
 Skickat: den 8 juni 2001 07:16
 Till: Orion-Interest
 Ämne: Dynamic finders
 
 
 
 
 Does anybody have a solution for implementing a finder that 
 takes some
 parameters, but searches taking into account only the ones 
 that are not
 null?
 Basically, this would be used to support a search page in 
 which the user
 can choose to fill or not some fields of the search criteria.
 I know that probably the best way to do this is using a 
 Session Bean and
 JDBC, but is there a way to implement it using CMP Entity finders (in
 EJB1.1)?
 
 Thanks,
 Stefan