public function findByTimetableAndStopPointAndDomId($timetableId, $externalStopPointId, $domId)
    {
        $query = $this->getEntityManager()
            ->createQuery(
                'SELECT block FROM CanalTPMttBundle:Block block
                INNER JOIN block.stopPoint stop_point
                WHERE stop_point.externalId = :externalStopPointId
                AND block.timetable = :timetable
                AND block.domId = :domId'
            )
            ->setParameter('externalStopPointId', $externalStopPointId)
            ->setParameter('timetable', $timetableId)
            ->setParameter('domId', $domId);

        return $query->getOneOrNullResult();
    }