Templates for Java Persistence based on JPA