Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. private void closeStatement() throws DaoException, SQLException {
  2. try {
  3. getByIdStmt.close();
  4. } catch (Exception e) {
  5. throw new DaoException("Error! getByIdStmt is not closed");
  6. }
  7. try {
  8. updateStmt.close();
  9. } catch (Exception e) {
  10. throw new DaoException("Error! updateStmt is not closed");
  11. }
  12. try {
  13. addStmt.close();
  14. } catch (Exception e) {
  15. throw new DaoException("Error! addStmt is not closed");
  16. }
  17. try {
  18. deleteStmt.close();
  19. } catch (Exception e) {
  20. throw new DaoException("Error! deleteStmt is not closed");
  21. }
  22. System.out.println("Statement close");
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement