-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: JPA - Named Queries - Get parameter types
PostPosted: Wed Apr 07, 2010 5:28 am 
Newbie

Joined: Mon Mar 01, 2010 7:17 am
Posts: 10
Hi!

I am trying to generate a method for each named query of each JPA entity.
To do so, I have to get each query's parameter types, so that I can use them as arguments for my method.

Quote:
Ejb3Configuration cfg = new Ejb3Configuration();
cfg.configure("default", null);
Map namedQueries = cfg.getNamedQueries();


The namedQueries map contains NamedQueryDefinition objects for each named query. However, the parameterTypes property (that should contain the name and type for each parameter) is null.

Is there any other way of retrieving all named queries and their parameters (along with their respective types)?

Thank you.

Regards,
Nuno Guerreiro


Top
 Profile  
 
 Post subject: Re: JPA - Named Queries - Get parameter types
PostPosted: Wed Apr 14, 2010 6:27 am 
Newbie

Joined: Mon Mar 01, 2010 7:17 am
Posts: 10
ping


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.