Package org.hibernate.search.bridge.spi

Examples of org.hibernate.search.bridge.spi.ConversionContext


     *
     * @param luceneQueue work will be appended to this list
     */
    public void enqueueLuceneWork(List<LuceneWork> luceneQueue) {
      final Set<Entry<Serializable, PerEntityWork<T>>> entityInstances = entityById.entrySet();
      ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
      if ( purgeAll ) {
        luceneQueue.add( new PurgeAllLuceneWork( entityClass ) );
      }
      for ( Entry<Serializable, PerEntityWork<T>> entry : entityInstances ) {
        Serializable indexingId = entry.getKey();
View Full Code Here


    return fieldCacheUsage;
  }

  @Deprecated //with no replacement: too expensive to create the conversionContext each time this was needed
  public Term getTerm(Serializable id) {
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    DocumentFieldMetadata fieldMetadata = idPropertyMetadata.getFieldMetadata( idFieldName );
    String idFieldName = fieldMetadata.getName();
    return new Term( idFieldName, objectToString( getIdBridge(), idFieldName, id, conversionContext ) );
  }
View Full Code Here

    session.clear();
  }

  private void indexAllQueue(Session session, List<?> entities, InstanceInitializer sessionInitializer) {
    try {
      ConversionContext contextualBridge = new ContextualExceptionBridgeHelper();
        if ( entities == null || entities.isEmpty() ) {
          return;
        }
        else {
          log.tracef( "received a list of objects to index: %s", entities );
View Full Code Here

      throw log.unableToDeserializeAvroStream( e );
    }

    classReferences = asListOfString( result, "classReferences" );
    final List<GenericRecord> operations = asListOfGenericRecords( result, "operations" );
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    for ( GenericRecord operation : operations ) {
      String schema = operation.getSchema().getName();
      if ( "OptimizeAll".equals( schema ) ) {
        hydrator.addOptimizeAll();
      }
View Full Code Here

    return fieldCacheUsage;
  }

  @Deprecated //with no replacement: too expensive to create the conversionContext each time this was needed
  public Term getTerm(Serializable id) {
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    return new Term( idKeywordName, objectToString( idBridge, idKeywordName, id, conversionContext ) );
  }
View Full Code Here

    this.fieldName = fieldName;
    this.rangeString = buildRangeString();
    this.rangeType = rangeType;

    if ( Date.class.equals( rangeType ) ) {
      final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
      stringMin = documentBuilder.objectToString( fieldName, min, conversionContext );
      stringMax = documentBuilder.objectToString( fieldName, max, conversionContext );
    }
  }
View Full Code Here

  }

  @Override
  public Query createQuery() {
    final int size = fieldsContext.size();
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    if ( size == 1 ) {
      return queryCustomizer.setWrappedQuery( createQuery( fieldsContext.getFirst(), conversionContext ) ).createQuery();
    }
    else {
      BooleanQuery aggregatedFieldsQuery = new BooleanQuery();
View Full Code Here

      throw log.unableToDeserializeAvroStream( e );
    }

    classReferences = asListOfString( result, "classReferences" );
    final List<GenericRecord> operations = asListOfGenericRecords( result, "operations" );
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    for ( GenericRecord operation : operations ) {
      String schema = operation.getSchema().getName();
      if ( "OptimizeAll".equals( schema ) ) {
        hydrator.addOptimizeAll();
      }
View Full Code Here

     *
     * @param luceneQueue work will be appended to this list
     */
    public void enqueueLuceneWork(List<LuceneWork> luceneQueue) {
      final Set<Entry<Serializable, PerEntityWork>> entityInstances = entityById.entrySet();
      ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
      if ( purgeAll ) {
        luceneQueue.add( new PurgeAllLuceneWork( entityClass ) );
      }
      for ( Entry<Serializable, PerEntityWork> entry : entityInstances ) {
        Serializable indexingId = entry.getKey();
View Full Code Here

  }

  @Override
  public Query createQuery() {
    final int size = fieldContexts.size();
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    if ( size == 1 ) {
      return queryCustomizer.setWrappedQuery( createQuery( fieldContexts.get( 0 ), conversionContext ) ).createQuery();
    }
    else {
      BooleanQuery aggregatedFieldsQuery = new BooleanQuery( );
View Full Code Here

TOP

Related Classes of org.hibernate.search.bridge.spi.ConversionContext

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.