使用动态EJB-QL查询,我写过这方面的文档,你可以看看
http://expert.csdn.net/Expert/topic/1792/1792693.xml?temp=.9031641
如果有不清楚的地方,mail我
[email protected]