public static function getEntityNameFromClassName(string $className)
    {
        $entityName = constant(sprintf(self::ENTITY_NAME_CONST_FORMAT, $className));

        if ($entityName === AbstractEntity::ENTITY_NAME or !is_string($entityName)) {
            throw new NoEntityNameException($className);
        }

        return $entityName;
    }