Hibernate EntityObject and Linktype creation working, refactoring