Package org.springframework.data.solr.core.QueryParserBase

Examples of org.springframework.data.solr.core.QueryParserBase.NamedObjectsQuery


    return null;
  }

  private <T> SolrResultPage<T> doQueryForPage(Query query, Class<T> clazz) {

    NamedObjectsQuery namedObjectsQuery = new NamedObjectsQuery(query);
    QueryResponse response = query(namedObjectsQuery);

    Map<String, Object> objectsName = namedObjectsQuery.getNamesAssociation();

    return createSolrResultPage(query, clazz, response, objectsName);
  }
View Full Code Here


    GroupOptions groupOptions = Mockito.mock(GroupOptions.class);
    Mockito.when(groupQueryMock.getGroupOptions()).thenReturn(groupOptions);
    Mockito.when(groupOptions.getGroupByFunctions()).thenReturn(functionList);
    Mockito.when(groupOptions.getGroupByQueries()).thenReturn(queriesList);

    NamedObjectsQuery decorator = new NamedObjectsQuery(groupQueryMock);
    decorator.setName(functionList.get(0), "nameFunc0");
    decorator.setName(functionList.get(1), "nameFunc1");
    decorator.setName(queriesList.get(0), "nameQuery0");
    decorator.setName(queriesList.get(1), "nameQuery1");
    Map<String, Object> objectNames = decorator.getNamesAssociation();

    Assert.assertEquals(functionList.get(0), objectNames.get("nameFunc0"));
    Assert.assertEquals(functionList.get(1), objectNames.get("nameFunc1"));
    Assert.assertEquals(queriesList.get(0), objectNames.get("nameQuery0"));
    Assert.assertEquals(queriesList.get(1), objectNames.get("nameQuery1"));
View Full Code Here

TOP

Related Classes of org.springframework.data.solr.core.QueryParserBase.NamedObjectsQuery

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.