Examples of SearchMapping


Examples of org.hibernate.search.cfg.SearchMapping

      cfg = new ReflectionReplacingSearchConfiguration( reflectionManager, cfg );
    }

    BuildContext buildContext = new BuildContext();

    final SearchMapping mapping = SearchMappingBuilder.getSearchMapping( cfg );
    applySearchMappingToMetadata( reflectionManager, mapping );

    factoryState.setSearchMapping( mapping ); // might be null if feature is not used

    factoryState.setIndexingStrategy( defineIndexingStrategy( cfg ) );//need to be done before the document builds
View Full Code Here

Examples of org.hibernate.search.cfg.SearchMapping

    }

    if ( modelMappingProperty == null ) {
      return null;
    }
    SearchMapping mapping = null;
    Object programmaticConfig = modelMappingProperty;
    if ( programmaticConfig instanceof SearchMapping ) {
      mapping = (SearchMapping) programmaticConfig;
      return mapping;
    }
View Full Code Here

Examples of org.hibernate.search.cfg.SearchMapping

    validateMappingFactoryDefinition( count, clazz );
    return mapping;
  }

  private static SearchMapping getNewInstanceOfSearchMapping(Class<?> clazz, Method method) {
    SearchMapping mapping;
    try {
      LOG.debugf( "invoking factory method [ %s.%s ] to get search mapping instance", clazz.getName(), method.getName() );
      Object instance = clazz.newInstance();
      mapping = (SearchMapping) method.invoke( instance );
    }
View Full Code Here

Examples of org.hibernate.search.cfg.SearchMapping

    }

    if ( modelMappingProperty == null) {
      return null;
    }
    SearchMapping mapping = null;
    Object programmaticConfig = modelMappingProperty;
    if (programmaticConfig instanceof SearchMapping) {
      mapping = (SearchMapping) programmaticConfig;
      return mapping;
    }
View Full Code Here

Examples of org.hibernate.search.cfg.SearchMapping

    validateMappingFactoryDefinition(count, clazz);
    return mapping;
  }

  private static SearchMapping getNewInstanceOfSearchMapping(Class<?> clazz, Method method) {
    SearchMapping mapping = null;
    try {
      LOG.debug("invoking factory method [ {}.{} ] to get search mapping instance", clazz.getName(), method.getName());
      Object instance = clazz.newInstance();
      mapping = (SearchMapping) method.invoke(instance);
    } catch (Exception e) {
View Full Code Here

Examples of org.hibernate.search.cfg.SearchMapping

   }

   private Properties addProgrammaticMappings(Properties indexingProperties, ComponentRegistry cr) {
      Iterator<ProgrammaticSearchMappingProvider> providers = ServiceFinder.load(ProgrammaticSearchMappingProvider.class).iterator();
      if (providers.hasNext()) {
         SearchMapping mapping = (SearchMapping) indexingProperties.get(Environment.MODEL_MAPPING);
         if (mapping == null) {
            mapping = new SearchMapping();
            Properties amendedProperties = new Properties();
            amendedProperties.putAll(indexingProperties);
            amendedProperties.put(Environment.MODEL_MAPPING, mapping);
            indexingProperties = amendedProperties;
         }
View Full Code Here

Examples of org.hibernate.search.cfg.SearchMapping

   }

   private Properties addProgrammaticMappings(Properties indexingProperties, ComponentRegistry cr) {
      Iterator<ProgrammaticSearchMappingProvider> providers = ServiceLoader.load(ProgrammaticSearchMappingProvider.class).iterator();
      if (providers.hasNext()) {
         SearchMapping mapping = (SearchMapping) indexingProperties.get(Environment.MODEL_MAPPING);
         if (mapping == null) {
            mapping = new SearchMapping();
            Properties amendedProperties = new Properties();
            amendedProperties.putAll(indexingProperties);
            amendedProperties.put(Environment.MODEL_MAPPING, mapping);
            indexingProperties = amendedProperties;
         }
View Full Code Here

Examples of org.hibernate.search.cfg.SearchMapping

    FullTextSessionBuilder builder = new FullTextSessionBuilder()
        .addAnnotatedClass( Catalog.class )
        .addAnnotatedClass( CatalogItem.class )
        .addAnnotatedClass( Consumer.class )
        .addAnnotatedClass( Item.class );
    SearchMapping fluentMapping = builder.fluentMapping();
    // mapping for Catalog
    EntityMapping catalogMapping = fluentMapping
        .entity( Catalog.class );
    if ( withClassBridgeOnCatalog ) {
      catalogMapping.classBridge( NoopClassBridge.class );
    }
    catalogMapping
        .property( "catalogItems", ElementType.FIELD ).containedIn();

    // mapping for CatalogItem
    fluentMapping.entity( CatalogItem.class )
        .property( "item", ElementType.FIELD ).containedIn()
        .property( "catalog", ElementType.FIELD ).indexEmbedded();

    // mapping for Item
    IndexedMapping itemMapping = fluentMapping
        .entity( Item.class )
        .indexed();
    if ( withClassBridgeOnItem ) {
      itemMapping.classBridge( NoopClassBridge.class );
    }
View Full Code Here

Examples of org.hibernate.search.cfg.SearchMapping

      cfg = new ReflectionReplacingSearchConfiguration( reflectionManager, cfg );
    }

    BuildContext buildContext = new BuildContext();

    final SearchMapping mapping = SearchMappingBuilder.getSearchMapping( cfg );
    applySearchMappingToMetadata( reflectionManager, mapping );

    factoryState.setSearchMapping( mapping ); // might be null if feature is not used

    factoryState.setIndexingStrategy( defineIndexingStrategy( cfg ) );//need to be done before the document builds
View Full Code Here

Examples of org.hibernate.search.cfg.SearchMapping

      cfg = new ReflectionReplacingSearchConfiguration( reflectionManager, cfg );
    }

    BuildContext buildContext = new BuildContext();

    final SearchMapping mapping = SearchMappingBuilder.getSearchMapping( cfg );
    applySearchMappingToMetadata( reflectionManager, mapping );

    factoryState.setSearchMapping( mapping ); // might be null if feature is not used

    factoryState.setIndexingStrategy( defineIndexingStrategy( cfg ) );//need to be done before the document builds
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.