File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Finder Query in Weblogic 6.1 CMP

 
Satish Gopalakrishnan
Ranch Hand
Posts: 52
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Anita Shah
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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 ???
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic