@Test public void returnsQueryIfAvailable() throws Exception { RequeryQueryMethod method = getQueryMethod(UserRepository.class, "findByLastname", String.class); assertThat(method.getAnnotatedQuery()).isNull(); method = getQueryMethod(UserRepository.class, "findByAnnotatedQuery", String.class); assertThat(method.getAnnotatedQuery()).isNotNull(); }
@Nullable String getAnnotatedQuery() { String query = getAnnotationValue("value", String.class); return StringUtils.hasText(query) ? query : null; }
RequeryQueryMethod extends QueryMethod { @Nullable String getAnnotatedQuery() { String query = getAnnotationValue("value", String.class); return StringUtils.hasText(query) ? query : null; } }
RequeryQueryMethod extends QueryMethod { @Nullable String getAnnotatedQuery() { String query = getAnnotationValue("value", String.class); return StringUtils.hasText(query) ? query : null; } RequeryQueryMethod(Method method, RepositoryMetadata metadata, ProjectionFactory factory); }
RequeryQueryMethod extends QueryMethod { @Nullable String getAnnotatedQuery() { String query = getAnnotationValue("value", String.class); return StringUtils.hasText(query) ? query : null; } RequeryQueryMethod(Method method, RepositoryMetadata metadata, ProjectionFactory factory); @Nonnull @SuppressWarnings("unchecked") @Override RequeryEntityMetadata<?> getEntityInformation(); @Override boolean isModifyingQuery(); boolean isAnnotatedQuery(); boolean isDefaultMethod(); boolean isOverridedMethod(); @Override RequeryParameters getParameters(); @Override boolean isCollectionQuery(); }
RequeryQueryMethod extends QueryMethod { @Nullable String getAnnotatedQuery() { String query = getAnnotationValue("value", String.class); return StringUtils.hasText(query) ? query : null; } RequeryQueryMethod(Method method, RepositoryMetadata metadata, ProjectionFactory factory); @Nonnull @SuppressWarnings("unchecked") @Override RequeryEntityMetadata<?> getEntityInformation(); @Override boolean isModifyingQuery(); boolean isAnnotatedQuery(); boolean isDefaultMethod(); boolean isOverridedMethod(); @Override RequeryParameters getParameters(); @Override boolean isCollectionQuery();  }