on 02-13-2006 3:53 PM
Hi all,
I have a container-managed bean referring to a small table. In this bean I have defined some lookup methods such as findByType(String type). In my session EJB however, I want to get a list of all the records from this table. Can anyone tell me how I can do this?
Thanks a lot!
Regards,
Hart
In persist.xml, I can use a SQL statement instead of EJB-QL statement. This is the only way I can think of.
It'll be appreciated if anyone has better ideas.
Regards,
Hart
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
why not specifying a public Collection findAll() throws FinderException within your Home-Interface ?
You have to declare within ejb-jar.xml as well; sth. like
<entity>
...
<abstract-schema-name>
xyzASN
<abstract-schema-name>
...
<query>
<query-method>
<method-name>
findAll
</method-name>
<method-params/>
</query-method>
<ejb-ql>
SELECT OBJ(o) FROM xyzASN AS o
<ejb-ql>
</query>
...
</entity>
AFAIK you could specify this within NWDS as well but I don't remember how.
Anyway, you get a Collection of Remote/Local component interfaces this way which you could iterate through.
Regards
Matthias
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.