public function entityClass($name = null)
    {
        deprecationWarning(
            get_called_class() . '::entityClass() is deprecated. ' .
            'Use setEntityClass()/getEntityClass() instead.'
        );
        if ($name !== null) {
            $this->setEntityClass($name);
        }

        return $this->getEntityClass();
    }