Java based project with hibernate