Monday, December 30, 2002 04:35 AM
First you will have to determine whether you will be using a container managed persistence (CMP) or bean managed persistence (BMP).
In case if you are using BMP, then you can add a finder method method and pass the amount as a parameter in that method in home interface. While in the bean impl class you can write a proper sql query that will return collection of remote interfaces.
While if you use CMP then you will have to mention the finder method in the home interface. As in CMP the container constructs proper data retrieval query, you will just need to mention the kind of query using ejbQL(if u are using ejb2.0)in the ejbjar.xml. So for ur kind of query the query format would look like:-
FROM User user
WHERE user.userInfo.salary > ?1
For better understanding you can have a look into the EJBQL details about the kind of query it supports with the declaration struction in ejb_jar.xml.
Hope this answers your query to a good extent.