openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <>
Subject Re: Using OpenJPA internal APIs to accessing meta-data for custom code generators
Date Tue, 15 May 2007 21:48:04 GMT
Probably you should look at the AuxiliaryEnhancer in the PCEnhancer
class -- it gives you some hooks for doing further processing during
the OpenJPA enhancement process.

>From there, you should look at ClassMetaData and MetaDataRepository.
That's got references to pretty much everything else you'll need.


On 5/15/07, Evan Ireland <> wrote:
> Folks,
> I am exploring the idea of using OpenJPA internal APIs to obtain
> meta-data from a persistence unit (e.g. JAR) for use in custom
> code generation.
> Since I'm a bit of a newbie to OpenJPA, it would be helpful if
> someone could give me some starting pointers to save me a little
> time.
> Suppose I have the path to an O/S file (e.g. /mydevice/myentity.jar).
> What would be the appropriate entry point into the OpenJPA APIs to
> have it parse the deployment descriptor (if present) and combine
> that meta data with the meta data collected from annotations?
> What would be the appropriate entry point (I I were say to use
> a visitor pattern) to 'visit' all the meta data thus obtained?
> Finally, in regard to named queries, if the meta data indicates
> a named query, what would be the appropriate API entry point to
> obtain generated SQL for that query, without actually being
> connected to a database (just from the meta data)?
> Thanks in advance.

Patrick Linskey
202 669 5907

View raw message