private function setId(DataTransferObjectInterface $dto): void
    {
        $entityFqn  = $dto::getEntityFqn();
        $reflection = $this->getDsmFromEntityFqn($entityFqn)
                           ->getReflectionClass();
        if ($reflection->implementsInterface(UuidPrimaryKeyInterface::class)) {
            $dto->setId($entityFqn::buildUuid($this->uuidFactory));
        }
    }