public function importJournals($ids)
    {
        $journalsSql = 'SELECT journal_id, path FROM journals WHERE journal_id IN (?)';
        $journalsStatement = $this->dbalConnection->executeQuery($journalsSql, array($ids), array(Connection::PARAM_INT_ARRAY));
        $journals = $journalsStatement->fetchAll();

        foreach ($journals as $journal) {
            $existingJournal = $this->em
                ->getRepository('VipaJournalBundle:Journal')
                ->findOneBy(['slug' => $journal['path']]);

            if (!$existingJournal) {
                try {
                    $journalImporter = new JournalImporter(
                        $this->dbalConnection, $this->em, $this->logger, $this->consoleOutput, $this->ui
                    );
                    
                    $ids = $journalImporter->importJournal($journal['journal_id']);
                    $journalUserImporter = new JournalUserImporter($this->dbalConnection, $this->em, $this->logger, $this->consoleOutput);
                    $journalUserImporter->importJournalUsers($ids['new'], $ids['old'], $this->ui);
                } catch (Exception $exception) {
                    $message = sprintf(
                        '%s: %s (uncaught exception) at %s line %s',
                        get_class($exception),
                        $exception->getMessage(),
                        $exception->getFile(),
                        $exception->getLine()
                    );

                    $this->consoleOutput->writeln('Importing of journal #' . $journal['journal_id'] . ' failed.');
                    $this->consoleOutput->writeln($message);
                    $this->consoleOutput->writeln($exception->getTraceAsString());
                }
            } else {
                $this->consoleOutput->writeln('Journal #' . $journal['journal_id'] . ' already imported. Skipped.');
            }
        }
    }