Package com.gemstone.gemfire.cache.query

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


  @Override
  @SuppressWarnings("unchecked")
  public <E> SelectResults<E> find(final String queryString, final Object... params) throws InvalidDataAccessApiUsageException {
    try {
      QueryService queryService = lookupQueryService(getRegion());
      Query query = queryService.newQuery(queryString);
      Object result = query.execute(params);

      if (result instanceof SelectResults) {
        return (SelectResults<E>) result;
      }
View Full Code Here


  @Override
  @SuppressWarnings("unchecked")
  public <T> T findUnique(final String queryString, final Object... params) throws InvalidDataAccessApiUsageException {
    try {
      QueryService queryService = lookupQueryService(getRegion());
      Query query = queryService.newQuery(queryString);
      Object result = query.execute(params);

      if (result instanceof SelectResults) {
        SelectResults<T> selectResults = (SelectResults<T>) result;
View Full Code Here

  public void setUp() throws FunctionDomainException, TypeMismatchException, NameResolutionException, QueryInvocationTargetException {
    QueryService queryService = MockRegionFactory.mockQueryService();
    Query singleQuery = mock(Query.class);

    when(singleQuery.execute(any(Object[].class))).thenReturn(0);
    when(queryService.newQuery(SINGLE_QUERY)).thenReturn(singleQuery);

    Query multipleQuery = mock(Query.class);
    SelectResults selectResults = mock(SelectResults.class);

    when(multipleQuery.execute(any(Object[].class))).thenReturn(selectResults);
View Full Code Here

    Query multipleQuery = mock(Query.class);
    SelectResults selectResults = mock(SelectResults.class);

    when(multipleQuery.execute(any(Object[].class))).thenReturn(selectResults);
    when(queryService.newQuery(MULTI_QUERY)).thenReturn(multipleQuery);
  }

  @After
  public void tearDown() {
    template.setExposeNativeRegion(false);
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.