Package org.infinispan.query.backend

Examples of org.infinispan.query.backend.KeyTransformationHandler


      indexManager.performOperations(workToApply, null);
      return Boolean.TRUE; //Return value to be ignored
   }

   private List<LuceneWork> transformKeysToStrings(final List<LuceneWork> luceneWorks) {
      final KeyTransformationHandler keyTransformationHandler = queryInterceptor.getKeyTransformationHandler();
      ArrayList<LuceneWork> transformedWorks = new ArrayList<LuceneWork>(luceneWorks.size());
      for (LuceneWork lw : luceneWorks) {
         LuceneWork transformedLuceneWork = lw
               .getWorkDelegate(LuceneWorkTransformationVisitor.INSTANCE)
               .cloneOverridingIdString(lw, keyTransformationHandler);
View Full Code Here


      HSQuery hsQuery = mock(HSQuery.class);
      cache = mock(AdvancedCache.class);
      when(hsQuery.queryDocumentExtractor()).thenReturn(extractor);
      when(hsQuery.queryResultSize()).thenReturn(entityInfos.size());

      LazyIterator iterator = new LazyIterator(hsQuery, new EntityLoader(cache, new KeyTransformationHandler()), getFetchSize());
   }
View Full Code Here

      HSQuery hsQuery = mock(HSQuery.class);
      cache = mock(AdvancedCache.class);
      when(hsQuery.queryDocumentExtractor()).thenReturn(extractor);
      when(hsQuery.queryResultSize()).thenReturn(entityInfos.size());

      EagerIterator iterator = new EagerIterator(entityInfos, new EntityLoader(cache, new KeyTransformationHandler()), getFetchSize());
   }
View Full Code Here

      keys = new ArrayList<String>();
      dummyResults = new HashMap<String, String>();

      entityInfos = new ArrayList<EntityInfo>();
      keyTransformationHandler = new KeyTransformationHandler();

      for (int i = 1; i <= 10; i++) {
         String key = "key" + i;
         keys.add(key);
         entityInfos.add(new MockEntityInfo(keyTransformationHandler.keyToString(key)));
View Full Code Here

      HSQuery hsQuery = mock(HSQuery.class);
      when(hsQuery.queryDocumentExtractor()).thenReturn(extractor);
      when(hsQuery.queryResultSize()).thenReturn(entityInfos.size());

      iterator = new LazyIterator(hsQuery, new EntityLoader(cache, new KeyTransformationHandler()), getFetchSize());
   }
View Full Code Here

      indexManager.performOperations(workToApply, null);
      return Boolean.TRUE; //Return value to be ignored
   }

   private List<LuceneWork> transformKeysToStrings(final List<LuceneWork> luceneWorks) {
      final KeyTransformationHandler keyTransformationHandler = queryInterceptor.getKeyTransformationHandler();
      ArrayList<LuceneWork> transformedWorks = new ArrayList<LuceneWork>(luceneWorks.size());
      for (LuceneWork lw : luceneWorks) {
         LuceneWork transformedLuceneWork = lw
               .getWorkDelegate(LuceneWorkTransformationVisitor.INSTANCE)
               .cloneOverridingIdString(lw, keyTransformationHandler);
View Full Code Here

      keys = new ArrayList<String>();
      dummyResults = new HashMap<String, String>();

      entityInfos = new ArrayList<EntityInfo>();
      keyTransformationHandler = new KeyTransformationHandler();

      for (int i = 1; i <= 10; i++) {
         String key = "key" + i;
         keys.add(key);
         entityInfos.add(new MockEntityInfo(keyTransformationHandler.keyToString(key)));
View Full Code Here

            int index = (Integer) invocation.getArguments()[0];
            return entityInfos.get(index);
         }
      });

      iterator = new LazyIterator(extractor, new EntityLoader(cache, new KeyTransformationHandler()), getFetchSize());
   }
View Full Code Here

            return entityInfos.get(index);
         }
      });

      cache = mock(AdvancedCache.class);
      new LazyIterator(extractor, new EntityLoader(cache, new KeyTransformationHandler()), getFetchSize());
   }
View Full Code Here

   }

   @Test(expectedExceptions = IllegalArgumentException.class)
   public void testEagerIteratorInitWithInvalidFetchSize() throws IOException {
      cache = mock(AdvancedCache.class);
      new EagerIterator(entityInfos, new EntityLoader(cache, new KeyTransformationHandler()), getFetchSize());
   }
View Full Code Here

TOP

Related Classes of org.infinispan.query.backend.KeyTransformationHandler

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.