getSql() public method

public getSql ( Doctrine\ORM\Query\Filter\SQLFilter $sqlFilter, Doctrine\Common\Persistence\Mapping\ClassMetadata $targetEntity, string $targetTableAlias ) : string
$sqlFilter Doctrine\ORM\Query\Filter\SQLFilter
$targetEntity Doctrine\Common\Persistence\Mapping\ClassMetadata Metadata object for the target entity to create the constraint for
$targetTableAlias string The target table alias used in the current query
return string
 /**
  * Note: The result of this method cannot be cached, as the target table alias might change for different query scenarios
  *
  * @param ClassMetadata $targetEntity
  * @param string $targetTableAlias
  * @return string
  */
 public function getSqlConstraint(ClassMetadata $targetEntity, $targetTableAlias)
 {
     $this->evaluateMatcher();
     /** @var EntityManager $entityManager */
     $entityManager = $this->objectManager->get(ObjectManager::class);
     $sqlFilter = new SqlFilter($entityManager);
     if (!$this->matchesEntityType($targetEntity->getName())) {
         return null;
     }
     return $this->conditionGenerator->getSql($sqlFilter, $targetEntity, $targetTableAlias);
 }
 /**
  * @param DoctrineSqlFilter $sqlFilter
  * @param ClassMetaData $targetEntity Metadata object for the target entity to create the constraint for
  * @param string $targetTableAlias The target table alias used in the current query
  * @return string
  */
 public function getSql(DoctrineSqlFilter $sqlFilter, ClassMetadata $targetEntity, $targetTableAlias)
 {
     return ' NOT (' . $this->expression->getSql($sqlFilter, $targetEntity, $targetTableAlias) . ')';
 }