public static function getObjectManager(ManagerRegistry $registry, $entity, Constraint $constraint)
    {
        self::validateConstraint($constraint);
        /* @var UniqueEntity $constraint */

        return self::findObjectManager($registry, $entity, $constraint);
    }
public static function getObjectManager(ManagerRegistry $registry, $entity, Constraint $constraint)
    {
        self::validateConstraint($constraint);
        /* @var UniqueEntity $constraint */

        return self::findObjectManager($registry, $entity, $constraint);
    }
public static function getObjectManager ( ManagerRegistry $ registry , $ entity , Constraint $ constraint ) { self :: validateConstraint ( $ constraint ) ; /* @var UniqueEntity $constraint */ return self :: findObjectManager ( $ registry , $ entity , $ constraint ) ; }
Pre validate entity.

@param ManagerRegistry $registry
@param object          $entity
@param Constraint      $constraint

@throws UnexpectedTypeException
@throws ConstraintDefinitionException

@return ObjectManager
Pre validate entity .