Refactored. Now the controller uses the classes from the restclient project, and internally translates them to the hibernate entities.