コード例 #1
0
 public void createCelebrity(
     String firstname, String surname, Date dateOfBirth, String biography) {
   Celebrity celebrity = new Celebrity(firstname, surname, dateOfBirth, biography);
   JpaHelper.beginTransaction();
   JpaHelper.getEntityManager().persist(celebrity);
   JpaHelper.commitTransaction();
 }
コード例 #2
0
 public Celebrity find(long id) {
   return JpaHelper.getEntityManager().find(Celebrity.class, id);
 }