@Test public void testSavePerson() { try (Session session = factory.openSession()) { Transaction tx = session.beginTransaction(); Person person = new Person(); person.setName("J. C. Smell"); session.save(person); tx.commit(); } }
public void setName(String name) { this.name = name; }
Person { public void setName(String name) { this.name = name; } }
Person { public void setName(String name) { this.name = name; } Person(); }
Person { public void setName(String name) { this.name = name; } Person(); Long getId(); void setId(Long id); String getName(); void setName(String name); @Override String toString(); }
Person { public void setName(String name) { this.name = name; } Person(); Long getId(); void setId(Long id); String getName(); void setName(String name); @Override String toString();  }