private void sendNotification(ArrayList<Integer> idlist) { userDAO = new UserDao(); emailnotification = new EmailNotification(); for (Integer i : idlist) { try { User u = userDAO.find(i); emailnotification.sendVIPStatusNotification(u.getEmail(), u.getName(), true); } catch (MyException e) { e .printStackTrace(); // To change body of catch statement use File | Settings | File // Templates. } } }