Examples of ConversionContext


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

    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

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

public class JavaSerializationDeserializer implements Deserializer {

  @Override
  public void deserialize(byte[] data, LuceneWorksBuilder hydrator) {
    Message message = SerializationHelper.toInstance( data, Message.class );
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    for ( Operation operation : message.getOperations() ) {
      if ( operation instanceof OptimizeAll ) {
        hydrator.addOptimizeAll();
      }
      else if ( operation instanceof PurgeAll ) {
View Full Code Here

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

    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

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

      }
    }
    byte[] newData = new byte[data.length - 2];
    System.arraycopy( data, 2, newData, 0, newData.length );
    Message message = SerializationHelper.toInstance( newData, Message.class );
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    for ( Operation operation : message.getOperations() ) {
      if ( operation instanceof OptimizeAll ) {
        hydrator.addOptimizeAll();
      }
      else if ( operation instanceof PurgeAll ) {
View Full Code Here

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

      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

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

          range.isMinIncluded(),
          range.isMaxIncluded()
      );
    }
    else if ( minOrMax instanceof Date ) {
      final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
      return createRangeQuery(
          documentBuilder.objectToString( getFieldName(), range.getMin(), conversionContext ),
          documentBuilder.objectToString( getFieldName(), range.getMax(), conversionContext ),
          range.isMinIncluded(),
          range.isMaxIncluded()
View Full Code Here

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

  }

  @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

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

    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

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

  }

  @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

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

      }
    }
    byte[] newData = new byte[data.length-2];
    System.arraycopy( data, 2, newData, 0, newData.length );
    Message message = SerializationHelper.toInstance( newData, Message.class );
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    for ( Operation operation : message.getOperations() ) {
      if ( operation instanceof OptimizeAll ) {
        hydrator.addOptimizeAll();
      }
      else if ( operation instanceof PurgeAll ) {
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.