public function getLocksForNodeTranslation(NodeTranslation $nodeTranslation, $isPublicVersion, $threshold, BaseUser $userToExclude = null)
    {
        $qb = $this->createQueryBuilder('nvl')
            ->select('nvl')
            ->where('nvl.nodeTranslation = :nt')
            ->andWhere('nvl.publicVersion = :pub')
            ->andWhere('nvl.createdAt > :date')
            ->setParameter('nt', $nodeTranslation)
            ->setParameter('pub', $isPublicVersion)
            ->setParameter('date', new \DateTime(sprintf('-%s seconds', $threshold)))
        ;

        if (!is_null($userToExclude)) {
            $qb->andWhere('nvl.owner <> :owner')
                ->setParameter('owner', $userToExclude->getUsername())
            ;
        }

        return $qb->getQuery()->getResult();
    }