Re: Dynamic finders

2001-06-13 Thread Sergei Batiuk
Title: SV: Dynamic finders



Dear Magnus,

The question is: does ORION provide some kind of 
mechanism (like a callback function), that could be implemented by a programmer 
and return a query string upon request, instead of making them 'final'? One way 
to do that is to make a BMP, but i want container to do all the JDBC job for me, 
while being able to flexibly generate queries for finder methods.

Generating finder methods for all possible queries 
doesn't sound like a good option. 

WBR,
Sergei

  - Original Message - 
  From: 
  Magnus 
  Rydin 
  To: Orion-Interest 
  Sent: Monday, June 11, 2001 9:41 AM
  Subject: 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-InterestAmne: 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 notnull?
  Basically, this would be used to support a search page inwhich 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 aSession Bean and 
 JDBC, but is there a way to implement 
  it using CMP Entity  finders (inEJB1.1)?
 Thanks,  
Stefan  


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 
   
   
  
 





RE: Dynamic finders

2001-06-09 Thread Dvornikov Victor

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 
  
  
 




Dynamic finders

2001-06-08 Thread Stefan Paun



 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