openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Evan Ireland" <eirel...@sybase.com>
Subject Using OpenJPA internal APIs to accessing meta-data for custom code generators
Date Tue, 15 May 2007 21:33:52 GMT
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.


Mime
View raw message