@Test void mapQueryRuleAllAttributeSearch() { QueryRule queryRule = mock(QueryRule.class); when(queryRule.getValue()).thenReturn("val"); EntityType entityType = mock(EntityType.class); QueryBuilder queryBuilder = queryClauseSearchGenerator.mapQueryRule(queryRule, entityType); QueryBuilder expectedQueryBuilder = QueryBuilders.matchPhraseQuery("_all", "val").slop(10); assertQueryBuilderEquals(expectedQueryBuilder, queryBuilder); }
QueryBuilder mapQueryRule(QueryRule queryRule, EntityType entityType) { if (queryRule.getValue() == null) { throw new MolgenisQueryException(QUERY_VALUE_CANNOT_BE_NULL_MSG); } if (queryRule.getField() == null) { return createQueryClauseSearchAll(queryRule); } else { return createQueryClauseSearchAttribute(queryRule, entityType); } }
QueryClauseSearchGenerator extends BaseQueryClauseGenerator { QueryBuilder mapQueryRule(QueryRule queryRule, EntityType entityType) { if (queryRule.getValue() == null) { throw new MolgenisQueryException(QUERY_VALUE_CANNOT_BE_NULL_MSG); } if (queryRule.getField() == null) { return createQueryClauseSearchAll(queryRule); } else { return createQueryClauseSearchAttribute(queryRule, entityType); } } }
QueryClauseSearchGenerator extends BaseQueryClauseGenerator { QueryBuilder mapQueryRule(QueryRule queryRule, EntityType entityType) { if (queryRule.getValue() == null) { throw new MolgenisQueryException(QUERY_VALUE_CANNOT_BE_NULL_MSG); } if (queryRule.getField() == null) { return createQueryClauseSearchAll(queryRule); } else { return createQueryClauseSearchAttribute(queryRule, entityType); } } QueryClauseSearchGenerator(DocumentIdGenerator documentIdGenerator); }
QueryClauseSearchGenerator extends BaseQueryClauseGenerator { QueryBuilder mapQueryRule(QueryRule queryRule, EntityType entityType) { if (queryRule.getValue() == null) { throw new MolgenisQueryException(QUERY_VALUE_CANNOT_BE_NULL_MSG); } if (queryRule.getField() == null) { return createQueryClauseSearchAll(queryRule); } else { return createQueryClauseSearchAttribute(queryRule, entityType); } } QueryClauseSearchGenerator(DocumentIdGenerator documentIdGenerator);  }
QueryClauseSearchGenerator extends BaseQueryClauseGenerator { QueryBuilder mapQueryRule(QueryRule queryRule, EntityType entityType) { if (queryRule.getValue() == null) { throw new MolgenisQueryException(QUERY_VALUE_CANNOT_BE_NULL_MSG); } if (queryRule.getField() == null) { return createQueryClauseSearchAll(queryRule); } else { return createQueryClauseSearchAttribute(queryRule, entityType); } } QueryClauseSearchGenerator(DocumentIdGenerator documentIdGenerator);   }