Hibernate working sample