public static function getCodeGenerator($entityClass, $entityField = 'code')
    {
        if (!isset(self::$generators[$entityClass][$entityField])) {
            throw new \Exception("There is no registered entity code generator for class $entityClass and field $entityField");
        }

        return self::$generators[$entityClass][$entityField];
    }