Port to JPA/Hibernate.