JDBC removed...

This commit is contained in:
Amit Dixit
2016-04-04 12:33:43 +05:30
parent deb15e2733
commit eb72493f13
4 changed files with 140 additions and 19 deletions

View File

@ -83,11 +83,15 @@ public final class App {
/* Add student in respectibe db */
mapper.insert(student);
if (log.isDebugEnabled()) {
log.debug("App.main(), student : " + student + ", is inserted");
}
/* Find this student */
final Optional<Student> studentToBeFound = mapper.find(student.getStudentId());
if (log.isDebugEnabled()) {
log.debug("App.main(), db find returned : " + studentToBeFound);
log.debug("App.main(), student : " + studentToBeFound + ", is searched");
}
/* Update existing student object */
@ -96,7 +100,15 @@ public final class App {
/* Update student in respectibe db */
mapper.update(student);
if (log.isDebugEnabled()) {
log.debug("App.main(), student : " + student + ", is updated");
}
/* Delete student in db */
if (log.isDebugEnabled()) {
log.debug("App.main(), student : " + student + ", is deleted");
}
mapper.delete(student);
}