Package com.gemstone.gemfire.cache.query.internal

Examples of com.gemstone.gemfire.cache.query.internal.ResultsBag


    try {
      if (jsonRegion) {
        returnValue = pjp.proceed();
        if (returnValue instanceof SelectResults && convertReturnedCollections) {
          ResultsBag resultsBag = new ResultsBag();
          for (Object obj : (SelectResults<?>) returnValue) {
            resultsBag.add(convertPdxInstanceToJSONString(obj));
          }
          returnValue = resultsBag;
        }
        else {
          returnValue = convertPdxInstanceToJSONString(returnValue);
View Full Code Here


    assertSame(expectedList, actualList);
  }

  @Test
  public void testToCollectionWithResultsBag() {
    ResultsBag mockResultsBag = mock(ResultsBag.class, "testToCollectionWithResultsBag.ResultsBag");
    List<String> expectedList = Arrays.asList("a", "b", "c");

    when(mockResultsBag.asList()).thenReturn(expectedList);

    Collection<?> actualList = repositoryQuery.toCollection(mockResultsBag);

    assertSame(expectedList, actualList);
  }
View Full Code Here

TOP

Related Classes of com.gemstone.gemfire.cache.query.internal.ResultsBag

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.