コード例 #1
0
 private void createSimpleEvent(
     SessionHolder sessionHolder, String description, Date eventDate, String eventKey) {
   SimpleEvent simpleEvent = new SimpleEvent();
   simpleEvent.setDescription(description);
   simpleEvent.setEventDate(eventDate);
   simpleEvent.setEventKey(eventKey);
   sessionHolder.saveOrUpdate(simpleEvent);
 }
コード例 #2
0
 private void createPerson(
     SessionHolder sessionHolder,
     String lastName,
     String firstName,
     String email,
     Date dateOfBirth) {
   Person person = new Person();
   person.setFirstName(firstName);
   person.setLastName(lastName);
   person.setEmail(email);
   person.setDateOfBirth(dateOfBirth);
   sessionHolder.saveOrUpdate(person);
 }