File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes Finder Query in Weblogic 6.1 CMP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Finder Query in Weblogic 6.1 CMP" Watch "Finder Query in Weblogic 6.1 CMP" New topic
Author

Finder Query in Weblogic 6.1 CMP

Satish Gopalakrishnan
Ranch Hand

Joined: Feb 13, 2001
Posts: 52
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

Joined: Oct 03, 2001
Posts: 2
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

Joined: Feb 13, 2001
Posts: 52
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 ???
 
GeeCON Prague 2014
 
subject: Finder Query in Weblogic 6.1 CMP