@Test void testGetQueryFieldNameList() { String fieldName0 = "MyFieldId1"; Attribute attribute0 = mock(Attribute.class); doReturn(fieldName0).when(documentIdGenerator).generateId(attribute0); String fieldName1 = "MyFieldId0"; Attribute attribute1 = mock(Attribute.class); doReturn(fieldName1).when(documentIdGenerator).generateId(attribute1); assertEquals( "MyFieldId1.MyFieldId0", queryGenerator.getQueryFieldName(asList(attribute0, attribute1))); }
String getQueryFieldName(List<Attribute> attributePath) { return attributePath.stream() .map(this::getQueryFieldName) .collect(joining(ATTRIBUTE_SEPARATOR)); }
BaseQueryClauseGenerator implements QueryClauseGenerator { String getQueryFieldName(List<Attribute> attributePath) { return attributePath.stream() .map(this::getQueryFieldName) .collect(joining(ATTRIBUTE_SEPARATOR)); } }
BaseQueryClauseGenerator implements QueryClauseGenerator { String getQueryFieldName(List<Attribute> attributePath) { return attributePath.stream() .map(this::getQueryFieldName) .collect(joining(ATTRIBUTE_SEPARATOR)); } BaseQueryClauseGenerator(DocumentIdGenerator documentIdGenerator, Operator operator); }
BaseQueryClauseGenerator implements QueryClauseGenerator { String getQueryFieldName(List<Attribute> attributePath) { return attributePath.stream() .map(this::getQueryFieldName) .collect(joining(ATTRIBUTE_SEPARATOR)); } BaseQueryClauseGenerator(DocumentIdGenerator documentIdGenerator, Operator operator); @Override Operator getOperator(); @Override QueryBuilder createQueryClause(QueryRule queryRule, EntityType entityType); }
BaseQueryClauseGenerator implements QueryClauseGenerator { String getQueryFieldName(List<Attribute> attributePath) { return attributePath.stream() .map(this::getQueryFieldName) .collect(joining(ATTRIBUTE_SEPARATOR)); } BaseQueryClauseGenerator(DocumentIdGenerator documentIdGenerator, Operator operator); @Override Operator getOperator(); @Override QueryBuilder createQueryClause(QueryRule queryRule, EntityType entityType);  }