Package org.hibernate.search.backend

Examples of org.hibernate.search.backend.UpdateLuceneWork


         return;
      }
      ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
      DocumentBuilderIndexedEntity docBuilder = entityIndexBinding.getDocumentBuilder();
      final String idInString = keyTransformationHandler.keyToString(key);
      UpdateLuceneWork updateTask = docBuilder.createUpdateWork(
            clazz,
            value,
            idInString,
            idInString,
            SimpleInitializer.INSTANCE,
View Full Code Here


  @Override
  public void addUpdateLuceneWork(String entityClassName, byte[] idAsByte, Map<String, String> fieldToAnalyzerMap) {
    Class<?> entityClass = ClassLoaderHelper.classForName( entityClassName, LuceneWorkHydrator.class, "entity class" );
    Serializable id = toSerializable( idAsByte, loader );
    LuceneWork result = new UpdateLuceneWork(
        id,
        objectIdInString(entityClass, id),
        entityClass,
        getLuceneDocument(),
        fieldToAnalyzerMap
View Full Code Here

  }
 
  public UpdateLuceneWork createUpdateWork(Class<T> entityClass, T entity, Serializable id, String idInString, EntityInitializer sessionInitializer) {
    Map<String, String> fieldToAnalyzerMap = new HashMap<String, String>();
    Document doc = getDocument( entity, id, fieldToAnalyzerMap, sessionInitializer );
    final UpdateLuceneWork addWork;
    if ( fieldToAnalyzerMap.isEmpty() ) {
      addWork = new UpdateLuceneWork( id, idInString, entityClass, doc );
    }
    else {
      addWork = new UpdateLuceneWork( id, idInString, entityClass, doc, fieldToAnalyzerMap );
    }
    return addWork;
  }
View Full Code Here

  }
 
  public UpdateLuceneWork createUpdateWork(Class<T> entityClass, T entity, Serializable id, String idInString, InstanceInitializer sessionInitializer, ConversionContext contextualBridge) {
    Map<String, String> fieldToAnalyzerMap = new HashMap<String, String>();
    Document doc = getDocument( entity, id, fieldToAnalyzerMap, sessionInitializer, contextualBridge );
    final UpdateLuceneWork addWork;
    if ( fieldToAnalyzerMap.isEmpty() ) {
      addWork = new UpdateLuceneWork( id, idInString, entityClass, doc );
    }
    else {
      addWork = new UpdateLuceneWork( id, idInString, entityClass, doc, fieldToAnalyzerMap );
    }
    return addWork;
  }
View Full Code Here

    Class<?> entityClass = ClassLoaderHelper.classForName(
        entityClassName,
        LuceneWorkHydrator.class,
        "entity class"
    );
    LuceneWork result = new UpdateLuceneWork(
        id,
        objectIdInString( entityClass, id, conversionContext ),
        entityClass,
        getLuceneDocument(),
        fieldToAnalyzerMap
View Full Code Here

    Class<?> entityClass = ClassLoaderHelper.classForName(
        entityClassName,
        LuceneWorkHydrator.class.getClassLoader(),
        "entity class"
    );
    LuceneWork result = new UpdateLuceneWork(
        id,
        objectIdInString( entityClass, id, conversionContext ),
        entityClass,
        getLuceneDocument(),
        fieldToAnalyzerMap
View Full Code Here

  }

  public UpdateLuceneWork createUpdateWork(Class<T> entityClass, T entity, Serializable id, String idInString, InstanceInitializer sessionInitializer, ConversionContext contextualBridge) {
    Map<String, String> fieldToAnalyzerMap = new HashMap<String, String>();
    Document doc = getDocument( entity, id, fieldToAnalyzerMap, sessionInitializer, contextualBridge );
    final UpdateLuceneWork addWork;
    if ( fieldToAnalyzerMap.isEmpty() ) {
      addWork = new UpdateLuceneWork( id, idInString, entityClass, doc );
    }
    else {
      addWork = new UpdateLuceneWork( id, idInString, entityClass, doc, fieldToAnalyzerMap );
    }
    return addWork;
  }
View Full Code Here

  }

  public UpdateLuceneWork createUpdateWork(Class<T> entityClass, T entity, Serializable id, String idInString, InstanceInitializer sessionInitializer, ConversionContext contextualBridge) {
    Map<String, String> fieldToAnalyzerMap = new HashMap<String, String>();
    Document doc = getDocument( entity, id, fieldToAnalyzerMap, sessionInitializer, contextualBridge, null );
    final UpdateLuceneWork addWork;
    if ( fieldToAnalyzerMap.isEmpty() ) {
      addWork = new UpdateLuceneWork( id, idInString, entityClass, doc );
    }
    else {
      addWork = new UpdateLuceneWork( id, idInString, entityClass, doc, fieldToAnalyzerMap );
    }
    return addWork;
  }
View Full Code Here

    Class<?> entityClass = ClassLoaderHelper.classForName(
        entityClassName,
        "entity class",
        searchFactory.getServiceManager()
    );
    LuceneWork result = new UpdateLuceneWork(
        id,
        objectIdInString( entityClass, id, conversionContext ),
        entityClass,
        getLuceneDocument(),
        fieldToAnalyzerMap
View Full Code Here

         return;
      }
      ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
      DocumentBuilderIndexedEntity docBuilder = entityIndexBinding.getDocumentBuilder();
      final String idInString = keyTransformationHandler.keyToString(key);
      UpdateLuceneWork updateTask = docBuilder.createUpdateWork(
            clazz,
            value,
            idInString,
            idInString,
            SimpleInitializer.INSTANCE,
View Full Code Here

TOP

Related Classes of org.hibernate.search.backend.UpdateLuceneWork

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.