コード例 #1
0
 @Override
 public void update(Student obj) {
   Student st = this.getByID(obj.getID());
   st.setDb(null);
   try {
     st.setName(obj.getName());
   } catch (RepositoryException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
   st.setDb(this.db);
 }
コード例 #2
0
 @Override
 public void updateStudent(Student student, String new_name, String new_surname)
     throws RepositoryException {
   Student st = this.getByID(student.getID());
   st.setDb(null);
   try {
     st.setName(new_name);
     st.setSurname(new_surname);
   } catch (RepositoryException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
   st.setDb(this.db);
 }