@Query("SELECT d FROM Depositor d WHERE d.name=:name") List<Depositor> findByName(@QueryParam("name") String name); }
public static Parameters create(Method method, Object[] parameters, EntityViewRepositoryMethod repositoryMethod) { int max = extractSizeRestriction(method, repositoryMethod); int first = DEFAULT_FIRST; List<Parameter> result = new ArrayList<Parameter>(parameters.length); int paramIndex = 1; Annotation[][] annotations = method.getParameterAnnotations(); for (int i = 0; i < parameters.length; i++) { if (isParameter(method.getParameterAnnotations()[i])) { QueryParam qpAnnotation = extractFrom(annotations[i], QueryParam.class); if (qpAnnotation != null) { result.add(new NamedParameter(qpAnnotation.value(), parameters[i])); } else { result.add(new NamedParameter("methodArg" + paramIndex++, parameters[i])); } } else { max = extractInt(parameters[i], annotations[i], MaxResults.class, max); first = extractInt(parameters[i], annotations[i], FirstResult.class, first); } } return new Parameters(result, max, first); }
QueryParam qpAnnotation = extractFrom(annotations[i], QueryParam.class); if (qpAnnotation != null) { result.add(new NamedParameter(qpAnnotation.value(), parameters[i])); } else { result.add(new IndexedParameter(paramIndex++, parameters[i]));
QueryParam qpAnnotation = extractFrom(annotations[i], QueryParam.class); if (qpAnnotation != null) { result.add(new NamedParameter(qpAnnotation.value(), parameters[i])); } else { result.add(new IndexedParameter(paramIndex++, parameters[i]));
QueryParam qpAnnotation = extractFrom(annotations[i], QueryParam.class); if (qpAnnotation != null) { result.add(new NamedParameter(qpAnnotation.value(), parameters[i])); } else { result.add(new IndexedParameter(paramIndex++, parameters[i]));
public static Parameters create(Method method, Object[] parameters, RepositoryMethodMetadata repositoryMethod) { int max = extractSizeRestriction(method, repositoryMethod); int first = DEFAULT_FIRST; List<Parameter> result = new ArrayList<Parameter>(parameters.length); int paramIndex = 1; Annotation[][] annotations = method.getParameterAnnotations(); for (int i = 0; i < parameters.length; i++) { if (isParameter(method.getParameterAnnotations()[i])) { QueryParam qpAnnotation = extractFrom(annotations[i], QueryParam.class); if (qpAnnotation != null) { result.add(new NamedParameter(qpAnnotation.value(), parameters[i])); } else { result.add(new IndexedParameter(paramIndex++, parameters[i])); } } else { max = extractInt(parameters[i], annotations[i], MaxResults.class, max); first = extractInt(parameters[i], annotations[i], FirstResult.class, first); } } return new Parameters(result, max, first); }
QueryParam qpAnnotation = extractFrom(annotations[i], QueryParam.class); if (qpAnnotation != null) { result.add(new NamedParameter(qpAnnotation.value(), parameters[i])); } else { result.add(new IndexedParameter(paramIndex++, parameters[i]));