RepositoryIndexManager(JcrRepository.RunningState repository, RepositoryConfiguration config) {
    this.repository = repository;
    this.config = config;
    this.context = repository.context();
    this.systemWorkspaceName = this.repository.repositoryCache().getSystemWorkspaceName();

    PathFactory pathFactory = this.context.getValueFactories().getPathFactory();
    this.indexesPath = pathFactory.createAbsolutePath(JcrLexicon.SYSTEM, ModeShapeLexicon.INDEXES);

    // Set up the index providers ...
    this.components = config.getIndexProviders();
    for (Component component : components) {
      try {
        IndexProvider provider =
            component.createInstance(ScanningQueryEngine.class.getClassLoader());
        register(provider);
      } catch (Throwable t) {
        if (t.getCause() != null) {
          t = t.getCause();
        }
        this.repository.error(
            t,
            JcrI18n.unableToInitializeIndexProvider,
            component,
            repository.name(),
            t.getMessage());
      }
    }
  }
 RepositoryNodeTypeManager with(
     JcrRepository.RunningState repository,
     boolean includeColumnsForInheritedProperties,
     boolean includePseudoColumnsInSelectStar) {
   assert this.systemWorkspaceName.equals(repository.repositoryCache().getSystemWorkspaceName());
   PathFactory pathFactory = repository.context().getValueFactories().getPathFactory();
   Path nodeTypesPath = pathFactory.createAbsolutePath(JcrLexicon.SYSTEM, JcrLexicon.NODE_TYPES);
   assert this.nodeTypesPath.equals(nodeTypesPath);
   RepositoryNodeTypeManager result =
       new RepositoryNodeTypeManager(
           repository, includeColumnsForInheritedProperties, includePseudoColumnsInSelectStar);
   // Now copy the node types from this cache into the new manager's cache ...
   // (If we didn't do this, we'd have to refresh from the system storage)
   result.nodeTypesCache = result.nodeTypesCache.with(this.nodeTypesCache.getAllNodeTypes());
   return result;
 }
  RepositoryNodeTypeManager(
      JcrRepository.RunningState repository,
      boolean includeColumnsForInheritedProperties,
      boolean includePseudoColumnsInSelectStar) {
    this.repository = repository;
    this.context = repository.context();
    this.nameFactory = this.context.getValueFactories().getNameFactory();
    this.systemWorkspaceName = this.repository.repositoryCache().getSystemWorkspaceName();

    PathFactory pathFactory = this.context.getValueFactories().getPathFactory();
    this.nodeTypesPath = pathFactory.createAbsolutePath(JcrLexicon.SYSTEM, JcrLexicon.NODE_TYPES);
    this.nodeTypesCache = new NodeTypes(this.context);

    this.includeColumnsForInheritedProperties = includeColumnsForInheritedProperties;
    this.includePseudoColumnsInSelectStar = includePseudoColumnsInSelectStar;
    queryParser = new BasicSqlQueryParser();
  }