Reformated all the code. (Thx to Idea:) ). Moved to the latest Hibernate and Hibernate-jpa-api versions.