@Override
    public ArrayList<Integer> findTasksId(int id_user) {
        ArrayList list = new ArrayList();
        try {
            connection = getConnection();
            ptmt = connection.prepareStatement("SELECT id_task FROM Task_executors WHERE id_user=?");
            ptmt.setInt(1, id_user);
            resultSet = ptmt.executeQuery();
            while(resultSet.next()) {
                list.add(resultSet.getInt("id_task"));
            }
        } catch (SQLException ex) {
            Logger.getLogger(TaskExecutorsDAO.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            try {
                if (ptmt != null) {
                    ptmt.close();
                }
                if (connection != null) {
                    connection.close();
                }
                if (resultSet != null) {
                    resultSet.close();
                }
            } catch (SQLException ex) {
                Logger.getLogger(UserDAO.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        return list;
    }