persistence@glassfish.java.net

List of entity classes

From: Gary Jacobson <gtjacobson_at_gmail.com>
Date: Thu, 25 Feb 2010 13:59:45 +0200

Hi all

Is there any way to retrieve a list of the entity classes available in the
application? (i.e. any class with @Entity annotated)

The only way I can think to do this is to use native SQL to get a list of
all database table names, convert them to class names by using my naming
convention, and loading each class via reflection.

I would guess that there must be some internal toplink utility class which
maintains a list.

Thanks
Gary