Package com.gemstone.gemfire.cache.query

Examples of com.gemstone.gemfire.cache.query.QueryService.createIndex()


  QueryService mockQueryService() throws RegionNotFoundException, IndexInvalidException, IndexNameConflictException, IndexExistsException, UnsupportedOperationException {
    QueryService queryService = mock(QueryService.class);

    when(queryService.getIndexes()).thenReturn(new ArrayList<Index>());

    when(queryService.createIndex(anyString(), anyString(),anyString())).thenAnswer(new Answer<Index>() {
      @Override
      public Index answer(InvocationOnMock invocation) throws Throwable {
        String indexName = (String) invocation.getArguments()[0];
        String indexedExpression = (String) invocation.getArguments()[1];
        String fromClause = (String) invocation.getArguments()[2];
View Full Code Here


        return mockIndex(indexName, com.gemstone.gemfire.cache.query.IndexType.FUNCTIONAL, indexedExpression,
          fromClause, null);
      }
    });

    when(queryService.createIndex(anyString(), anyString(),anyString(),anyString())).thenAnswer(new Answer<Index>() {
      @Override
      public Index answer(InvocationOnMock invocation) throws Throwable {
        String indexName = (String) invocation.getArguments()[0];
        String indexedExpression = (String) invocation.getArguments()[1];
        String fromClause = (String) invocation.getArguments()[2];
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.