Java Mailing List Archive

http://www.gg3721.com/

Home » users.openjpa »

Generic setParameter on createNamedQuery.query.

Kelly Kerr

2010-08-13

Replies: Find Java Web Hosting

Author LoginPost Reply

I want to pass to a generic EntityManager an Entity and the name of a
NamedQuery. I then want to createNamedQuery using the name passed as a
parameter. Now the problem - I need to setParameter, the parameter
name/value would be different for each NamedQuery. Is there a way to
dynamically determine the name of the expected parameters? Then I could use
reflection to extract the value from the input Entity bean and supply as
input to the setParameter.  
--
Sent from the OpenJPA Users mailing list archive at Nabble.com.
©2008 gg3721.com - Jax Systems, LLC, U.S.A.