@Override
    public void update(int id_task, int id_user, Boolean active) {
        try {
            connection = getConnection();
            ptmt = connection.prepareStatement("UPDATE Task_executors SET id_task=? id_user=? active=?"
                    + " WHERE id_task=? id_user=?;");
            ptmt.setInt(1, id_task);
            ptmt.setInt(2, id_user);
            ptmt.setBoolean(3, active);
            ptmt.setInt(4, id_task);
            ptmt.setInt(5, id_user);
            ptmt.executeUpdate();
        } 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);
            }
        }
    }