Thank you Kevin, the criteria API won't help me so I will have a look at the source code as you proposed. Could you give me a little hint where to start?
Thank you. Regards Jakob Kevin Sutter wrote: > > Hi Jakob, > A formal API does not exist yet... JPA 2.0 is defining the Criteria API > which provides a programmatic approach for creating and modifying JPA > Queries. We are actively developing this capability in trunk ( > http://openjpa.apache.org/jpa-20-roadmap.html), but neither the spec nor > the > implementation is complete yet. Also, just to be clear, this Criteria API > doesn't allow direct manipulation of JPQL. It's a separate mechanism from > JPQL for creating and manipulating queries. > > From a pure JPQL perspective, you could dive into our implementation and > get > access to the parsed JPQL (we are open source :-) ), but we really don't > have a defined API or SPI for manipulating JPQL statements per your > request > below. > > Thanks, > Kevin > > On Tue, Jun 16, 2009 at 1:28 PM, jakob <[email protected]> wrote: > >> Hi Group, >> >> I currently started working on a JPQL-Query builder which I need to >> modify >> queries (for security reasons) after they have been generated for the >> basic >> intend. I stumbled over OpenJPA and the JPQLExpressionBuilder, >> JPQLParser, >> etc. classes and wondered if iz is possible to use them to >> programmatically >> create a JPQL query and modify it before executing it. It would be >> perfect >> if I even could parse a JPQL query, modify it and then pass it back. Any >> hints or snippets on how to start would be nice, since I don't really >> know >> where to start and the API isn't (at least for me) intuitive enough to >> figure it out on my own. >> >> Thank you in advance. >> >> Regards Jakob >> > > -- View this message in context: http://n2.nabble.com/JPQL-Parser-tp3088157p3095904.html Sent from the OpenJPA Users mailing list archive at Nabble.com.
