Examples of ConversionContext


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

  private void index(Session session, Object entity) {
    try {
      final InstanceInitializer sessionInitializer = new HibernateSessionLoadingInitializer(
          (SessionImplementor) session );
      final ConversionContext contextualBridge = new ContextualExceptionBridgeHelper();

      // trick to attach the objects to session:
      session.buildLockRequest( LockOptions.NONE ).lock( entity );
      index( entity, session, sessionInitializer, contextualBridge );
      monitor.documentsBuilt( 1 );
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

    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

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

    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

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

    this.fieldContexts = fieldContexts;
  }

  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

    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

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

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

      EntityIndexBinding entityIndexBinding = searchFactory.getIndexBinding(clazz);
      if (entityIndexBinding == null) {
         // it might be possible to receive not-indexes types
         return;
      }
      ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
      DocumentBuilderIndexedEntity docBuilder = entityIndexBinding.getDocumentBuilder();
      final String idInString = keyTransformationHandler.keyToString(key);
      UpdateLuceneWork updateTask = docBuilder.createUpdateWork(
            clazz,
            value,
View Full Code Here

Examples of org.mapstruct.ap.model.common.ConversionContext

            if ( conversionProvider == null ) {
                return null;
            }

            ConversionContext ctx =
                new DefaultConversionContext( typeFactory, targetType, dateFormat );
            return conversionProvider.to( ctx );
        }
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.