public function setEntityClassName($name)
    {
        $trimmedName = trim($name, '\\');

        if (!class_exists($trimmedName)) {
            throw new RuntimeException(sprintf('The class "%s" does not exist.', $trimmedName));
        }

        $this->entityClassName = $trimmedName;

        return $this;
    }