Package org.hibernate.search.filter

Examples of org.hibernate.search.filter.FilterCachingStrategy


      }
    }
  }

  private static FilterCachingStrategy buildFilterCachingStrategy(Properties properties) {
    FilterCachingStrategy filterCachingStrategy;
    String impl = properties.getProperty( Environment.FILTER_CACHING_STRATEGY );
    if ( StringHelper.isEmpty( impl ) || "mru".equalsIgnoreCase( impl ) ) {
      filterCachingStrategy = new MRUFilterCachingStrategy();
    }
    else {
      filterCachingStrategy = ClassLoaderHelper.instanceFromName(
          FilterCachingStrategy.class,
          impl, ImmutableSearchFactory.class, "filterCachingStrategy"
      );
    }
    filterCachingStrategy.initialize( properties );
    return filterCachingStrategy;
  }
View Full Code Here


      }
    }
  }

  private static FilterCachingStrategy buildFilterCachingStrategy(Properties properties) {
    FilterCachingStrategy filterCachingStrategy;
    String impl = properties.getProperty( Environment.FILTER_CACHING_STRATEGY );
    if ( StringHelper.isEmpty( impl ) || "mru".equalsIgnoreCase( impl ) ) {
      filterCachingStrategy = new MRUFilterCachingStrategy();
    }
    else {
      filterCachingStrategy = ClassLoaderHelper.instanceFromName(
          FilterCachingStrategy.class,
          impl, ImmutableSearchFactory.class, "filterCachingStrategy"
      );
    }
    filterCachingStrategy.initialize( properties );
    return filterCachingStrategy;
  }
View Full Code Here

      injector.setMetadataProvider( new MappingModelMetadataProvider( original, mapping ) );
    }
  }

  private static FilterCachingStrategy buildFilterCachingStrategy(Properties properties) {
    FilterCachingStrategy filterCachingStrategy;
    String impl = properties.getProperty( Environment.FILTER_CACHING_STRATEGY );
    if ( StringHelper.isEmpty( impl ) || "mru".equalsIgnoreCase( impl ) ) {
      filterCachingStrategy = new MRUFilterCachingStrategy();
    }
    else {
      filterCachingStrategy = ClassLoaderHelper.instanceFromName(
          FilterCachingStrategy.class,
          impl,
          ImmutableSearchFactory.class.getClassLoader(),
          "filterCachingStrategy"
      );
    }
    filterCachingStrategy.initialize( properties );
    return filterCachingStrategy;
  }
View Full Code Here

    newMapping.setDocumentBuilderIndexedEntity( documentBuilder );
    return newMapping;
  }

  private static FilterCachingStrategy buildFilterCachingStrategy(Properties properties) {
    FilterCachingStrategy filterCachingStrategy;
    String impl = properties.getProperty( Environment.FILTER_CACHING_STRATEGY );
    if ( StringHelper.isEmpty( impl ) || "mru".equalsIgnoreCase( impl ) ) {
      filterCachingStrategy = new MRUFilterCachingStrategy();
    }
    else {
      filterCachingStrategy = ClassLoaderHelper.instanceFromName(
          FilterCachingStrategy.class,
          impl, ImmutableSearchFactory.class, "filterCachingStrategy"
      );
    }
    filterCachingStrategy.initialize( properties );
    return filterCachingStrategy;
  }
View Full Code Here

    newMapping.setDocumentBuilderIndexedEntity( documentBuilder );
    return newMapping;
  }

  private static FilterCachingStrategy buildFilterCachingStrategy(Properties properties) {
    FilterCachingStrategy filterCachingStrategy;
    String impl = properties.getProperty( Environment.FILTER_CACHING_STRATEGY );
    if ( StringHelper.isEmpty( impl ) || "mru".equalsIgnoreCase( impl ) ) {
      filterCachingStrategy = new MRUFilterCachingStrategy();
    }
    else {
      filterCachingStrategy = ClassLoaderHelper.instanceFromName(
          FilterCachingStrategy.class,
          impl, ImmutableSearchFactory.class, "filterCachingStrategy"
      );
    }
    filterCachingStrategy.initialize( properties );
    return filterCachingStrategy;
  }
View Full Code Here

      }
    }
  }

  private static FilterCachingStrategy buildFilterCachingStrategy(Properties properties) {
    FilterCachingStrategy filterCachingStrategy;
    String impl = properties.getProperty( Environment.FILTER_CACHING_STRATEGY );
    if ( StringHelper.isEmpty( impl ) || "mru".equalsIgnoreCase( impl ) ) {
      filterCachingStrategy = new MRUFilterCachingStrategy();
    }
    else {
      filterCachingStrategy = ClassLoaderHelper.instanceFromName(
          FilterCachingStrategy.class,
          impl, ImmutableSearchFactory.class, "filterCachingStrategy"
      );
    }
    filterCachingStrategy.initialize( properties );
    return filterCachingStrategy;
  }
View Full Code Here

      injector.setMetadataProvider( new MappingModelMetadataProvider( original, mapping ) );
    }
  }

  private static FilterCachingStrategy buildFilterCachingStrategy(Properties properties) {
    FilterCachingStrategy filterCachingStrategy;
    String impl = properties.getProperty( Environment.FILTER_CACHING_STRATEGY );
    if ( StringHelper.isEmpty( impl ) || "mru".equalsIgnoreCase( impl ) ) {
      filterCachingStrategy = new MRUFilterCachingStrategy();
    }
    else {
      filterCachingStrategy = ClassLoaderHelper.instanceFromName(
          FilterCachingStrategy.class,
          impl,
          ImmutableSearchFactory.class.getClassLoader(),
          "filterCachingStrategy"
      );
    }
    filterCachingStrategy.initialize( properties );
    return filterCachingStrategy;
  }
View Full Code Here

    analyzers = context.initLazyAnalyzers();
    factory.startDirectoryProviders();
  }

  private static FilterCachingStrategy buildFilterCachingStrategy(Properties properties) {
    FilterCachingStrategy filterCachingStrategy;
    String impl = properties.getProperty( Environment.FILTER_CACHING_STRATEGY );
    if ( StringHelper.isEmpty( impl ) || "mru".equalsIgnoreCase( impl ) ) {
      filterCachingStrategy = new MRUFilterCachingStrategy();
    }
    else {
      try {
        Class filterCachingStrategyClass = org.hibernate
            .annotations
            .common
            .util
            .ReflectHelper
            .classForName( impl, SearchFactoryImpl.class );
        filterCachingStrategy = ( FilterCachingStrategy ) filterCachingStrategyClass.newInstance();
      }
      catch ( ClassNotFoundException e ) {
        throw new SearchException( "Unable to find filterCachingStrategy class: " + impl, e );
      }
      catch ( IllegalAccessException e ) {
        throw new SearchException( "Unable to instantiate filterCachingStrategy class: " + impl, e );
      }
      catch ( InstantiationException e ) {
        throw new SearchException( "Unable to instantiate filterCachingStrategy class: " + impl, e );
      }
    }
    filterCachingStrategy.initialize( properties );
    return filterCachingStrategy;
  }
View Full Code Here

      injector.setMetadataProvider( new MappingModelMetadataProvider( original, mapping ) );
    }
  }

  private static FilterCachingStrategy buildFilterCachingStrategy(Properties properties) {
    FilterCachingStrategy filterCachingStrategy;
    String impl = properties.getProperty( Environment.FILTER_CACHING_STRATEGY );
    if ( StringHelper.isEmpty( impl ) || "mru".equalsIgnoreCase( impl ) ) {
      filterCachingStrategy = new MRUFilterCachingStrategy();
    }
    else {
      filterCachingStrategy = ClassLoaderHelper.instanceFromName(
          FilterCachingStrategy.class,
          impl,
          ImmutableSearchFactory.class.getClassLoader(),
          "filterCachingStrategy"
      );
    }
    filterCachingStrategy.initialize( properties );
    return filterCachingStrategy;
  }
View Full Code Here

      }
    }
  }

  private static FilterCachingStrategy buildFilterCachingStrategy(Properties properties) {
    FilterCachingStrategy filterCachingStrategy;
    String impl = properties.getProperty( Environment.FILTER_CACHING_STRATEGY );
    if ( StringHelper.isEmpty( impl ) || "mru".equalsIgnoreCase( impl ) ) {
      filterCachingStrategy = new MRUFilterCachingStrategy();
    }
    else {
      filterCachingStrategy = PluginLoader.instanceFromName( FilterCachingStrategy.class,
          impl, SearchFactoryImpl.class, "filterCachingStrategy" );
    }
    filterCachingStrategy.initialize( properties );
    return filterCachingStrategy;
  }
View Full Code Here

TOP

Related Classes of org.hibernate.search.filter.FilterCachingStrategy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.