• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Finder Query in Weblogic 6.1 CMP

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Has someone written a finder query with more than one condition.
i.e Select fields from table where condition1,condition2,condition3
I am using only EJB 1.1.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I think u can do it.
For eg. if I want to select employees whose empno > 7000 and salary > 3000
Then your typical finder query syntax,
parameters >>> (java.lang.Integer empno, java.lang.Double sal)
query >>>> (& (> empno 7000) (> sal 3000))
I hope this might help u...
Bye.
 
Satish Gopalakrishnan
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Anita,
But could you tell me how to handle queries with more than one AND condition. say if empno > 7000 and salary > 3000 and name = 'xyz' .Because & is a boolean operator would you have to do (& (& (> empno 7000) (> sal 3000)) (=name 'xyz') ) ???.Any ideas /suggestions ???
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic