EJB2.0 introduced concept of EJB-QL to retrieve CMP beans. You can use WHERE clause in your EJB-QL and pass in parameters as part of findBy method parameters. Here is a sample ejb-ql which demonstrates a findBy method with EJB-QL having WHERE
clause.
hotelEJB
...
hotelSchemaName
...
...
findByCity
java.lang.String
hotelSchemaName AS h WHERE h.city = ?1]]>
...
...
SOURCE :
www.referjava.com
No comments:
Post a Comment