HibernateExample:change the structure to make the code easier