We have common modules (for configuration, security, notifications, etc.) that define the entities and the logic for the module as a reusable JAR. The only imposed dependency is the name of the table that the JPA entities map to (we use JPA annotations were possible, Hibernate annotations were JPA doesn't define one).
Is there a way to remap a JPA entity to a different table (ideally applications would change the table name prefix to comply with the app's table prefix name)? We can't use the MappedSuperClass annotation because the HQL use the entity name and our DAOs are generified on the entity.