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 -----
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-----
> Från: 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
> > >
> > >
> >
>

Reply via email to