@Test public void testValidateTerms() { final HashSet<ValueIndexTerm> queryTerms = new HashSet<>(); queryTerms.add(new ValuePackageNameIndexTerm("*", ValueIndexTerm.TermSearchType.WILDCARD)); queryTerms.add(new ValueModuleRootPathIndexTerm()); new FindPackageNamesQuery().validateTerms(queryTerms); }
@Override public void validateTerms(Set<ValueIndexTerm> queryTerms) { checkNotNullAndNotEmpty(queryTerms); checkInvalidAndRequiredTerms(queryTerms, NAME, new String[]{ null, packageNameIndexTerm.getTerm() }, (t) -> (t instanceof ValueModuleRootPathIndexTerm), (t) -> (Objects.equals(t.getTerm(), packageNameIndexTerm.getTerm()))); }
FindPackageNamesQuery extends AbstractFindQuery implements NamedQuery { @Override public void validateTerms(Set<ValueIndexTerm> queryTerms) { checkNotNullAndNotEmpty(queryTerms); checkInvalidAndRequiredTerms(queryTerms, NAME, new String[]{ null, packageNameIndexTerm.getTerm() }, (t) -> (t instanceof ValueModuleRootPathIndexTerm), (t) -> (Objects.equals(t.getTerm(), packageNameIndexTerm.getTerm()))); } }
FindPackageNamesQuery extends AbstractFindQuery implements NamedQuery { @Override public void validateTerms(Set<ValueIndexTerm> queryTerms) { checkNotNullAndNotEmpty(queryTerms); checkInvalidAndRequiredTerms(queryTerms, NAME, new String[]{ null, packageNameIndexTerm.getTerm() }, (t) -> (t instanceof ValueModuleRootPathIndexTerm), (t) -> (Objects.equals(t.getTerm(), packageNameIndexTerm.getTerm()))); }  }
FindPackageNamesQuery extends AbstractFindQuery implements NamedQuery { @Override public void validateTerms(Set<ValueIndexTerm> queryTerms) { checkNotNullAndNotEmpty(queryTerms); checkInvalidAndRequiredTerms(queryTerms, NAME, new String[]{ null, packageNameIndexTerm.getTerm() }, (t) -> (t instanceof ValueModuleRootPathIndexTerm), (t) -> (Objects.equals(t.getTerm(), packageNameIndexTerm.getTerm()))); }  @Override String getName(); @Override ResponseBuilder getResponseBuilder(); @Override Query toQuery(Set<ValueIndexTerm> terms); @Override void validateTerms(Set<ValueIndexTerm> queryTerms); }
FindPackageNamesQuery extends AbstractFindQuery implements NamedQuery { @Override public void validateTerms(Set<ValueIndexTerm> queryTerms) { checkNotNullAndNotEmpty(queryTerms); checkInvalidAndRequiredTerms(queryTerms, NAME, new String[]{ null, packageNameIndexTerm.getTerm() }, (t) -> (t instanceof ValueModuleRootPathIndexTerm), (t) -> (Objects.equals(t.getTerm(), packageNameIndexTerm.getTerm()))); }  @Override String getName(); @Override ResponseBuilder getResponseBuilder(); @Override Query toQuery(Set<ValueIndexTerm> terms); @Override void validateTerms(Set<ValueIndexTerm> queryTerms); static final String NAME; }