Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2012 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.data.gemfire.repository.query;
Gemfire specific org.springframework.data.repository.query.QueryMethod.

Author(s):
Oliver Gierke
public class GemfireQueryMethod extends QueryMethod {
	private final Method method;
	private final GemfirePersistentEntity<?> entity;

Creates a new GemfireQueryMethod from the given java.lang.reflect.Method and org.springframework.data.repository.core.RepositoryMetadata.

Parameters:
method must not be null.
metadata must not be null.
context must not be null.
	public GemfireQueryMethod(Method methodRepositoryMetadata metadata,
		super(methodmetadata);
		Assert.notNull(context);
		for (Class<?> type : method.getParameterTypes()) {
			if (Pageable.class.isAssignableFrom(type)) {
				throw new IllegalStateException("Pagination is not supported by Gemfire repositories! Offending method: "
method.toString());
			}
		}
		this. = method;
	}

Returns whether the query method contains an annotated, non-empty query.

Returns:
whether the query method contains an annotated, non-empty query.
	public boolean hasAnnotatedQuery() {
		return StringUtils.hasText(getAnnotatedQuery());
	}

		return ;
	}

Returns the query annotated to the query method.

Returns:
the annotated query or null in case it's empty or none available.
		Query query = .getAnnotation(Query.class);
		String queryString = query == null ? null : (String) AnnotationUtils.getValue(query);
		return StringUtils.hasText(queryString) ? queryString : null;
	}
New to GrepCode? Check out our FAQ X