/** * Create an instance of {@link ElasticsearchResponseDto } * */ public ElasticsearchResponseDto createElasticsearchResponseDto() { return new ElasticsearchResponseDto(); }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { { List<BusinessObjectDefinitionIndexSearchResponseDto> theBusinessObjectDefinitionIndexSearchResponseDtos; theBusinessObjectDefinitionIndexSearchResponseDtos = (((this.businessObjectDefinitionIndexSearchResponseDtos!= null)&&(!this.businessObjectDefinitionIndexSearchResponseDtos.isEmpty()))?this.getBusinessObjectDefinitionIndexSearchResponseDtos():null); strategy.appendField(locator, this, "businessObjectDefinitionIndexSearchResponseDtos", buffer, theBusinessObjectDefinitionIndexSearchResponseDtos, ((this.businessObjectDefinitionIndexSearchResponseDtos!= null)&&(!this.businessObjectDefinitionIndexSearchResponseDtos.isEmpty()))); } { List<TagTypeIndexSearchResponseDto> theTagTypeIndexSearchResponseDtos; theTagTypeIndexSearchResponseDtos = (((this.tagTypeIndexSearchResponseDtos!= null)&&(!this.tagTypeIndexSearchResponseDtos.isEmpty()))?this.getTagTypeIndexSearchResponseDtos():null); strategy.appendField(locator, this, "tagTypeIndexSearchResponseDtos", buffer, theTagTypeIndexSearchResponseDtos, ((this.tagTypeIndexSearchResponseDtos!= null)&&(!this.tagTypeIndexSearchResponseDtos.isEmpty()))); } { List<TagTypeIndexSearchResponseDto> theNestTagTypeIndexSearchResponseDtos; theNestTagTypeIndexSearchResponseDtos = (((this.nestTagTypeIndexSearchResponseDtos!= null)&&(!this.nestTagTypeIndexSearchResponseDtos.isEmpty()))?this.getNestTagTypeIndexSearchResponseDtos():null); strategy.appendField(locator, this, "nestTagTypeIndexSearchResponseDtos", buffer, theNestTagTypeIndexSearchResponseDtos, ((this.nestTagTypeIndexSearchResponseDtos!= null)&&(!this.nestTagTypeIndexSearchResponseDtos.isEmpty()))); } { List<ResultTypeIndexSearchResponseDto> theResultTypeIndexSearchResponseDtos; theResultTypeIndexSearchResponseDtos = (((this.resultTypeIndexSearchResponseDtos!= null)&&(!this.resultTypeIndexSearchResponseDtos.isEmpty()))?this.getResultTypeIndexSearchResponseDtos():null); strategy.appendField(locator, this, "resultTypeIndexSearchResponseDtos", buffer, theResultTypeIndexSearchResponseDtos, ((this.resultTypeIndexSearchResponseDtos!= null)&&(!this.resultTypeIndexSearchResponseDtos.isEmpty()))); } return buffer; }
public String toString() { final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); }
/** * Extracts facet information from a {@link SearchResult} object * * @param request The specified {@link IndexSearchRequest} * @param searchResult A given {@link SearchResult} to extract the facet information from * @param bdefActiveIndex the name of the active index for business object definitions * @param tagActiveIndex the name os the active index for tags * * @return A list of {@link Facet} objects */ private List<Facet> extractFacets(IndexSearchRequest request, SearchResult searchResult, final String bdefActiveIndex, final String tagActiveIndex) { ElasticsearchResponseDto elasticsearchResponseDto = new ElasticsearchResponseDto(); if (request.getFacetFields().contains(ElasticsearchHelper.TAG_FACET)) { elasticsearchResponseDto.setNestTagTypeIndexSearchResponseDtos(elasticsearchHelper.getNestedTagTagIndexSearchResponseDto(searchResult)); elasticsearchResponseDto.setTagTypeIndexSearchResponseDtos(elasticsearchHelper.getTagTagIndexSearchResponseDto(searchResult)); } if (request.getFacetFields().contains(ElasticsearchHelper.RESULT_TYPE_FACET)) { elasticsearchResponseDto.setResultTypeIndexSearchResponseDtos(elasticsearchHelper.getResultTypeIndexSearchResponseDto(searchResult)); } return elasticsearchHelper.getFacetsResponse(elasticsearchResponseDto, bdefActiveIndex, tagActiveIndex); }
@Test public void testGetFacetsResponseIncludingTag() { ElasticsearchResponseDto elasticsearchResponseDto = new ElasticsearchResponseDto(); List<TagTypeIndexSearchResponseDto> nestTagTypeIndexSearchResponseDtos = new ArrayList<>(); TagTypeIndexSearchResponseDto tagType1 = new TagTypeIndexSearchResponseDto(TAG_TYPE_CODE, null, TAG_TYPE_DISPLAY_NAME); TagTypeIndexSearchResponseDto tagType2 = new TagTypeIndexSearchResponseDto(TAG_TYPE_CODE_2, Collections.singletonList(new TagIndexSearchResponseDto(TAG_CODE, 1, TAG_CODE_DISPLAY_NAME)), TAG_TYPE_DISPLAY_NAME_2); nestTagTypeIndexSearchResponseDtos.add(tagType1); nestTagTypeIndexSearchResponseDtos.add(tagType2); elasticsearchResponseDto.setNestTagTypeIndexSearchResponseDtos(nestTagTypeIndexSearchResponseDtos); TagTypeIndexSearchResponseDto tagType3 = new TagTypeIndexSearchResponseDto(TAG_TYPE_CODE_2, Collections.singletonList(new TagIndexSearchResponseDto(TAG_CODE, 1, TAG_CODE_DISPLAY_NAME)), TAG_TYPE_DISPLAY_NAME_2); List<TagTypeIndexSearchResponseDto> tagTypeIndexSearchResponseDtos = new ArrayList<>(); tagTypeIndexSearchResponseDtos.add(tagType3); elasticsearchResponseDto.setTagTypeIndexSearchResponseDtos(tagTypeIndexSearchResponseDtos); List<Facet> facets = elasticsearchHelper.getFacetsResponse(elasticsearchResponseDto, BUSINESS_OBJECT_DEFINITION_SEARCH_INDEX_NAME, TAG_SEARCH_INDEX_NAME); List<Facet> expectedFacets = new ArrayList<>(); expectedFacets.add(new Facet(TAG_TYPE_DISPLAY_NAME, null, FacetTypeEnum.TAG_TYPE.value(), TAG_TYPE_CODE, new ArrayList<>())); List<Facet> tagFacet = new ArrayList<>(); tagFacet.add(new Facet(TAG_CODE_DISPLAY_NAME, 1L, FacetTypeEnum.TAG.value(), TAG_CODE, null)); expectedFacets.add(new Facet(TAG_TYPE_DISPLAY_NAME_2, null, FacetTypeEnum.TAG_TYPE.value(), TAG_TYPE_CODE_2, tagFacet)); assertEquals(expectedFacets, facets); }
if (elasticsearchResponseDto.getNestTagTypeIndexSearchResponseDtos() != null) for (TagTypeIndexSearchResponseDto tagTypeIndexSearchResponseDto : elasticsearchResponseDto.getNestTagTypeIndexSearchResponseDtos()) if (elasticsearchResponseDto.getTagTypeIndexSearchResponseDtos() != null) for (TagTypeIndexSearchResponseDto tagTypeIndexDto : elasticsearchResponseDto.getTagTypeIndexSearchResponseDtos()) if (elasticsearchResponseDto.getResultTypeIndexSearchResponseDtos() != null) for (ResultTypeIndexSearchResponseDto resultTypeIndexSearchResponseDto : elasticsearchResponseDto.getResultTypeIndexSearchResponseDtos())
@Test public void testGetFacetsResponse() { ElasticsearchResponseDto elasticsearchResponseDto = new ElasticsearchResponseDto(); List<TagTypeIndexSearchResponseDto> nestTagTypeIndexSearchResponseDtos = new ArrayList<>(); TagTypeIndexSearchResponseDto tagType1 = new TagTypeIndexSearchResponseDto(TAG_TYPE_CODE, null, TAG_TYPE_DISPLAY_NAME); TagTypeIndexSearchResponseDto tagType2 = new TagTypeIndexSearchResponseDto(TAG_TYPE_CODE_2, Collections.singletonList(new TagIndexSearchResponseDto(TAG_CODE, 1, TAG_CODE_DISPLAY_NAME)), TAG_TYPE_DISPLAY_NAME_2); nestTagTypeIndexSearchResponseDtos.add(tagType1); nestTagTypeIndexSearchResponseDtos.add(tagType2); elasticsearchResponseDto.setNestTagTypeIndexSearchResponseDtos(nestTagTypeIndexSearchResponseDtos); List<ResultTypeIndexSearchResponseDto> resultTypeIndexSearchResponseDtos = new ArrayList<>(); resultTypeIndexSearchResponseDtos.add(new ResultTypeIndexSearchResponseDto(TAG_CODE, TAG_COUNT, TAG_SEARCH_INDEX_NAME)); elasticsearchResponseDto.setResultTypeIndexSearchResponseDtos(resultTypeIndexSearchResponseDtos); List<Facet> facets = elasticsearchHelper.getFacetsResponse(elasticsearchResponseDto, BUSINESS_OBJECT_DEFINITION_SEARCH_INDEX_NAME, TAG_SEARCH_INDEX_NAME); List<Facet> expectedFacets = new ArrayList<>(); expectedFacets.add(new Facet(TAG_TYPE_DISPLAY_NAME, null, FacetTypeEnum.TAG_TYPE.value(), TAG_TYPE_CODE, new ArrayList<>())); List<Facet> tagFacet = new ArrayList<>(); tagFacet.add(new Facet(TAG_CODE_DISPLAY_NAME, 1L, FacetTypeEnum.TAG.value(), TAG_CODE, null)); expectedFacets.add(new Facet(TAG_TYPE_DISPLAY_NAME_2, null, FacetTypeEnum.TAG_TYPE.value(), TAG_TYPE_CODE_2, tagFacet)); expectedFacets.add(new Facet(SearchIndexTypeEntity.SearchIndexTypes.TAG.name(), 120L, FacetTypeEnum.RESULT_TYPE.value(), SearchIndexTypeEntity.SearchIndexTypes.TAG.name(), null)); assertEquals(expectedFacets, facets); }
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; }
/** * Extracts facet information from a {@link SearchResult} object * * @param request The specified {@link IndexSearchRequest} * @param searchResult A given {@link SearchResult} to extract the facet information from * @param bdefActiveIndex the name of the active index for business object definitions * @param tagActiveIndex the name os the active index for tags * * @return A list of {@link Facet} objects */ private List<Facet> extractFacets(IndexSearchRequest request, SearchResult searchResult, final String bdefActiveIndex, final String tagActiveIndex) { ElasticsearchResponseDto elasticsearchResponseDto = new ElasticsearchResponseDto(); if (request.getFacetFields().contains(ElasticsearchHelper.TAG_FACET)) { elasticsearchResponseDto.setNestTagTypeIndexSearchResponseDtos(elasticsearchHelper.getNestedTagTagIndexSearchResponseDto(searchResult)); elasticsearchResponseDto.setTagTypeIndexSearchResponseDtos(elasticsearchHelper.getTagTagIndexSearchResponseDto(searchResult)); } if (request.getFacetFields().contains(ElasticsearchHelper.RESULT_TYPE_FACET)) { elasticsearchResponseDto.setResultTypeIndexSearchResponseDtos(elasticsearchHelper.getResultTypeIndexSearchResponseDto(searchResult)); } return elasticsearchHelper.getFacetsResponse(elasticsearchResponseDto, bdefActiveIndex, tagActiveIndex); }
@Test public void testGetFacetsResponseIncludingTagWithNoAssociatedBdefs() { ElasticsearchResponseDto elasticsearchResponseDto = new ElasticsearchResponseDto(); List<TagTypeIndexSearchResponseDto> nestTagTypeIndexSearchResponseDtos = new ArrayList<>(); TagTypeIndexSearchResponseDto tagType1 = new TagTypeIndexSearchResponseDto(TAG_TYPE_CODE, null, TAG_TYPE_DISPLAY_NAME); TagTypeIndexSearchResponseDto tagType2 = new TagTypeIndexSearchResponseDto(TAG_TYPE_CODE_2, Collections.singletonList(new TagIndexSearchResponseDto(TAG_CODE, 1, TAG_CODE_DISPLAY_NAME)), TAG_TYPE_DISPLAY_NAME_2); nestTagTypeIndexSearchResponseDtos.add(tagType1); nestTagTypeIndexSearchResponseDtos.add(tagType2); elasticsearchResponseDto.setNestTagTypeIndexSearchResponseDtos(nestTagTypeIndexSearchResponseDtos); TagTypeIndexSearchResponseDto tagType3 = new TagTypeIndexSearchResponseDto(TAG_TYPE_CODE_2, Collections.singletonList(new TagIndexSearchResponseDto(TAG_CODE_2, 1, TAG_CODE_DISPLAY_NAME_2)), TAG_TYPE_DISPLAY_NAME_2); List<TagTypeIndexSearchResponseDto> tagTypeIndexSearchResponseDtos = new ArrayList<>(); tagTypeIndexSearchResponseDtos.add(tagType3); elasticsearchResponseDto.setTagTypeIndexSearchResponseDtos(tagTypeIndexSearchResponseDtos); List<Facet> facets = elasticsearchHelper.getFacetsResponse(elasticsearchResponseDto, BUSINESS_OBJECT_DEFINITION_SEARCH_INDEX_NAME, TAG_SEARCH_INDEX_NAME); List<Facet> expectedFacets = new ArrayList<>(); expectedFacets.add(new Facet(TAG_TYPE_DISPLAY_NAME, null, FacetTypeEnum.TAG_TYPE.value(), TAG_TYPE_CODE, new ArrayList<>())); List<Facet> tagFacet = new ArrayList<>(); tagFacet.add(new Facet(TAG_CODE_DISPLAY_NAME, 1L, FacetTypeEnum.TAG.value(), TAG_CODE, null)); tagFacet.add(new Facet(TAG_CODE_DISPLAY_NAME_2, 1L, FacetTypeEnum.TAG.value(), TAG_CODE_2, null)); expectedFacets.add(new Facet(TAG_TYPE_DISPLAY_NAME_2, null, FacetTypeEnum.TAG_TYPE.value(), TAG_TYPE_CODE_2, tagFacet)); assertEquals(expectedFacets, facets); }
if (elasticsearchResponseDto.getNestTagTypeIndexSearchResponseDtos() != null) for (TagTypeIndexSearchResponseDto tagTypeIndexSearchResponseDto : elasticsearchResponseDto.getNestTagTypeIndexSearchResponseDtos()) if (elasticsearchResponseDto.getTagTypeIndexSearchResponseDtos() != null) for (TagTypeIndexSearchResponseDto tagTypeIndexDto : elasticsearchResponseDto.getTagTypeIndexSearchResponseDtos()) if (elasticsearchResponseDto.getResultTypeIndexSearchResponseDtos() != null) for (ResultTypeIndexSearchResponseDto resultTypeIndexSearchResponseDto : elasticsearchResponseDto.getResultTypeIndexSearchResponseDtos())
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = 1; { List<BusinessObjectDefinitionIndexSearchResponseDto> theBusinessObjectDefinitionIndexSearchResponseDtos; theBusinessObjectDefinitionIndexSearchResponseDtos = (((this.businessObjectDefinitionIndexSearchResponseDtos!= null)&&(!this.businessObjectDefinitionIndexSearchResponseDtos.isEmpty()))?this.getBusinessObjectDefinitionIndexSearchResponseDtos():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "businessObjectDefinitionIndexSearchResponseDtos", theBusinessObjectDefinitionIndexSearchResponseDtos), currentHashCode, theBusinessObjectDefinitionIndexSearchResponseDtos, ((this.businessObjectDefinitionIndexSearchResponseDtos!= null)&&(!this.businessObjectDefinitionIndexSearchResponseDtos.isEmpty()))); } { List<TagTypeIndexSearchResponseDto> theTagTypeIndexSearchResponseDtos; theTagTypeIndexSearchResponseDtos = (((this.tagTypeIndexSearchResponseDtos!= null)&&(!this.tagTypeIndexSearchResponseDtos.isEmpty()))?this.getTagTypeIndexSearchResponseDtos():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "tagTypeIndexSearchResponseDtos", theTagTypeIndexSearchResponseDtos), currentHashCode, theTagTypeIndexSearchResponseDtos, ((this.tagTypeIndexSearchResponseDtos!= null)&&(!this.tagTypeIndexSearchResponseDtos.isEmpty()))); } { List<TagTypeIndexSearchResponseDto> theNestTagTypeIndexSearchResponseDtos; theNestTagTypeIndexSearchResponseDtos = (((this.nestTagTypeIndexSearchResponseDtos!= null)&&(!this.nestTagTypeIndexSearchResponseDtos.isEmpty()))?this.getNestTagTypeIndexSearchResponseDtos():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "nestTagTypeIndexSearchResponseDtos", theNestTagTypeIndexSearchResponseDtos), currentHashCode, theNestTagTypeIndexSearchResponseDtos, ((this.nestTagTypeIndexSearchResponseDtos!= null)&&(!this.nestTagTypeIndexSearchResponseDtos.isEmpty()))); } { List<ResultTypeIndexSearchResponseDto> theResultTypeIndexSearchResponseDtos; theResultTypeIndexSearchResponseDtos = (((this.resultTypeIndexSearchResponseDtos!= null)&&(!this.resultTypeIndexSearchResponseDtos.isEmpty()))?this.getResultTypeIndexSearchResponseDtos():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "resultTypeIndexSearchResponseDtos", theResultTypeIndexSearchResponseDtos), currentHashCode, theResultTypeIndexSearchResponseDtos, ((this.resultTypeIndexSearchResponseDtos!= null)&&(!this.resultTypeIndexSearchResponseDtos.isEmpty()))); } return currentHashCode; }
@Test public void testGetFacetsResponseIncludingTagWithNoAssociatedBdefsNewTagType() { ElasticsearchResponseDto elasticsearchResponseDto = new ElasticsearchResponseDto(); List<TagTypeIndexSearchResponseDto> nestTagTypeIndexSearchResponseDtos = new ArrayList<>(); TagTypeIndexSearchResponseDto tagType1 = new TagTypeIndexSearchResponseDto(TAG_TYPE_CODE, null, TAG_TYPE_DISPLAY_NAME); TagTypeIndexSearchResponseDto tagType2 = new TagTypeIndexSearchResponseDto(TAG_TYPE_CODE_2, Collections.singletonList(new TagIndexSearchResponseDto(TAG_CODE, 1, TAG_CODE_DISPLAY_NAME)), TAG_TYPE_DISPLAY_NAME_2); nestTagTypeIndexSearchResponseDtos.add(tagType1); nestTagTypeIndexSearchResponseDtos.add(tagType2); elasticsearchResponseDto.setNestTagTypeIndexSearchResponseDtos(nestTagTypeIndexSearchResponseDtos); TagTypeIndexSearchResponseDto tagType3 = new TagTypeIndexSearchResponseDto(TAG_TYPE_CODE_3, Collections.singletonList(new TagIndexSearchResponseDto(TAG_CODE_2, 1, TAG_CODE_DISPLAY_NAME_2)), TAG_TYPE_DISPLAY_NAME_3); List<TagTypeIndexSearchResponseDto> tagTypeIndexSearchResponseDtos = new ArrayList<>(); tagTypeIndexSearchResponseDtos.add(tagType3); elasticsearchResponseDto.setTagTypeIndexSearchResponseDtos(tagTypeIndexSearchResponseDtos); List<Facet> facets = elasticsearchHelper.getFacetsResponse(elasticsearchResponseDto, BUSINESS_OBJECT_DEFINITION_SEARCH_INDEX_NAME, TAG_SEARCH_INDEX_NAME); List<Facet> expectedFacets = new ArrayList<>(); expectedFacets.add(new Facet(TAG_TYPE_DISPLAY_NAME, null, FacetTypeEnum.TAG_TYPE.value(), TAG_TYPE_CODE, new ArrayList<>())); List<Facet> tagFacet = new ArrayList<>(); tagFacet.add(new Facet(TAG_CODE_DISPLAY_NAME, 1L, FacetTypeEnum.TAG.value(), TAG_CODE, null)); List<Facet> newTagFacet = new ArrayList<>(); newTagFacet.add(new Facet(TAG_CODE_DISPLAY_NAME_2, 1L, FacetTypeEnum.TAG.value(), TAG_CODE_2, null)); expectedFacets.add(new Facet(TAG_TYPE_DISPLAY_NAME_2, null, FacetTypeEnum.TAG_TYPE.value(), TAG_TYPE_CODE_2, tagFacet)); expectedFacets.add(new Facet(TAG_TYPE_DISPLAY_NAME_3, null, FacetTypeEnum.TAG_TYPE.value(), TAG_TYPE_CODE_3, newTagFacet)); assertEquals(expectedFacets, facets); }
public Object createNewInstance() { return new ElasticsearchResponseDto(); }
lhsBusinessObjectDefinitionIndexSearchResponseDtos = (((this.businessObjectDefinitionIndexSearchResponseDtos!= null)&&(!this.businessObjectDefinitionIndexSearchResponseDtos.isEmpty()))?this.getBusinessObjectDefinitionIndexSearchResponseDtos():null); List<BusinessObjectDefinitionIndexSearchResponseDto> rhsBusinessObjectDefinitionIndexSearchResponseDtos; rhsBusinessObjectDefinitionIndexSearchResponseDtos = (((that.businessObjectDefinitionIndexSearchResponseDtos!= null)&&(!that.businessObjectDefinitionIndexSearchResponseDtos.isEmpty()))?that.getBusinessObjectDefinitionIndexSearchResponseDtos():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "businessObjectDefinitionIndexSearchResponseDtos", lhsBusinessObjectDefinitionIndexSearchResponseDtos), LocatorUtils.property(thatLocator, "businessObjectDefinitionIndexSearchResponseDtos", rhsBusinessObjectDefinitionIndexSearchResponseDtos), lhsBusinessObjectDefinitionIndexSearchResponseDtos, rhsBusinessObjectDefinitionIndexSearchResponseDtos, ((this.businessObjectDefinitionIndexSearchResponseDtos!= null)&&(!this.businessObjectDefinitionIndexSearchResponseDtos.isEmpty())), ((that.businessObjectDefinitionIndexSearchResponseDtos!= null)&&(!that.businessObjectDefinitionIndexSearchResponseDtos.isEmpty())))) { return false; lhsTagTypeIndexSearchResponseDtos = (((this.tagTypeIndexSearchResponseDtos!= null)&&(!this.tagTypeIndexSearchResponseDtos.isEmpty()))?this.getTagTypeIndexSearchResponseDtos():null); List<TagTypeIndexSearchResponseDto> rhsTagTypeIndexSearchResponseDtos; rhsTagTypeIndexSearchResponseDtos = (((that.tagTypeIndexSearchResponseDtos!= null)&&(!that.tagTypeIndexSearchResponseDtos.isEmpty()))?that.getTagTypeIndexSearchResponseDtos():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "tagTypeIndexSearchResponseDtos", lhsTagTypeIndexSearchResponseDtos), LocatorUtils.property(thatLocator, "tagTypeIndexSearchResponseDtos", rhsTagTypeIndexSearchResponseDtos), lhsTagTypeIndexSearchResponseDtos, rhsTagTypeIndexSearchResponseDtos, ((this.tagTypeIndexSearchResponseDtos!= null)&&(!this.tagTypeIndexSearchResponseDtos.isEmpty())), ((that.tagTypeIndexSearchResponseDtos!= null)&&(!that.tagTypeIndexSearchResponseDtos.isEmpty())))) { return false; lhsNestTagTypeIndexSearchResponseDtos = (((this.nestTagTypeIndexSearchResponseDtos!= null)&&(!this.nestTagTypeIndexSearchResponseDtos.isEmpty()))?this.getNestTagTypeIndexSearchResponseDtos():null); List<TagTypeIndexSearchResponseDto> rhsNestTagTypeIndexSearchResponseDtos; rhsNestTagTypeIndexSearchResponseDtos = (((that.nestTagTypeIndexSearchResponseDtos!= null)&&(!that.nestTagTypeIndexSearchResponseDtos.isEmpty()))?that.getNestTagTypeIndexSearchResponseDtos():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "nestTagTypeIndexSearchResponseDtos", lhsNestTagTypeIndexSearchResponseDtos), LocatorUtils.property(thatLocator, "nestTagTypeIndexSearchResponseDtos", rhsNestTagTypeIndexSearchResponseDtos), lhsNestTagTypeIndexSearchResponseDtos, rhsNestTagTypeIndexSearchResponseDtos, ((this.nestTagTypeIndexSearchResponseDtos!= null)&&(!this.nestTagTypeIndexSearchResponseDtos.isEmpty())), ((that.nestTagTypeIndexSearchResponseDtos!= null)&&(!that.nestTagTypeIndexSearchResponseDtos.isEmpty())))) { return false; lhsResultTypeIndexSearchResponseDtos = (((this.resultTypeIndexSearchResponseDtos!= null)&&(!this.resultTypeIndexSearchResponseDtos.isEmpty()))?this.getResultTypeIndexSearchResponseDtos():null); List<ResultTypeIndexSearchResponseDto> rhsResultTypeIndexSearchResponseDtos; rhsResultTypeIndexSearchResponseDtos = (((that.resultTypeIndexSearchResponseDtos!= null)&&(!that.resultTypeIndexSearchResponseDtos.isEmpty()))?that.getResultTypeIndexSearchResponseDtos():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "resultTypeIndexSearchResponseDtos", lhsResultTypeIndexSearchResponseDtos), LocatorUtils.property(thatLocator, "resultTypeIndexSearchResponseDtos", rhsResultTypeIndexSearchResponseDtos), lhsResultTypeIndexSearchResponseDtos, rhsResultTypeIndexSearchResponseDtos, ((this.resultTypeIndexSearchResponseDtos!= null)&&(!this.resultTypeIndexSearchResponseDtos.isEmpty())), ((that.resultTypeIndexSearchResponseDtos!= null)&&(!that.resultTypeIndexSearchResponseDtos.isEmpty())))) { return false;
@Override public ElasticsearchResponseDto build() { if (_storedValue == null) { return this.init(new ElasticsearchResponseDto()); } else { return ((ElasticsearchResponseDto) _storedValue); } }
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof ElasticsearchResponseDto) { final ElasticsearchResponseDto copy = ((ElasticsearchResponseDto) draftCopy); if (businessObjectDefinitionIndexSearchResponseDtosShouldBeCopiedAndSet == Boolean.TRUE) { List<BusinessObjectDefinitionIndexSearchResponseDto> sourceBusinessObjectDefinitionIndexSearchResponseDtos; sourceBusinessObjectDefinitionIndexSearchResponseDtos = (((this.businessObjectDefinitionIndexSearchResponseDtos!= null)&&(!this.businessObjectDefinitionIndexSearchResponseDtos.isEmpty()))?this.getBusinessObjectDefinitionIndexSearchResponseDtos():null); @SuppressWarnings("unchecked") List<BusinessObjectDefinitionIndexSearchResponseDto> copyBusinessObjectDefinitionIndexSearchResponseDtos = ((List<BusinessObjectDefinitionIndexSearchResponseDto> ) strategy.copy(LocatorUtils.property(locator, "businessObjectDefinitionIndexSearchResponseDtos", sourceBusinessObjectDefinitionIndexSearchResponseDtos), sourceBusinessObjectDefinitionIndexSearchResponseDtos, ((this.businessObjectDefinitionIndexSearchResponseDtos!= null)&&(!this.businessObjectDefinitionIndexSearchResponseDtos.isEmpty())))); copy.businessObjectDefinitionIndexSearchResponseDtos = null; if (copyBusinessObjectDefinitionIndexSearchResponseDtos!= null) { List<BusinessObjectDefinitionIndexSearchResponseDto> uniqueBusinessObjectDefinitionIndexSearchResponseDtosl = copy.getBusinessObjectDefinitionIndexSearchResponseDtos(); uniqueBusinessObjectDefinitionIndexSearchResponseDtosl.addAll(copyBusinessObjectDefinitionIndexSearchResponseDtos); if (tagTypeIndexSearchResponseDtosShouldBeCopiedAndSet == Boolean.TRUE) { List<TagTypeIndexSearchResponseDto> sourceTagTypeIndexSearchResponseDtos; sourceTagTypeIndexSearchResponseDtos = (((this.tagTypeIndexSearchResponseDtos!= null)&&(!this.tagTypeIndexSearchResponseDtos.isEmpty()))?this.getTagTypeIndexSearchResponseDtos():null); @SuppressWarnings("unchecked") List<TagTypeIndexSearchResponseDto> copyTagTypeIndexSearchResponseDtos = ((List<TagTypeIndexSearchResponseDto> ) strategy.copy(LocatorUtils.property(locator, "tagTypeIndexSearchResponseDtos", sourceTagTypeIndexSearchResponseDtos), sourceTagTypeIndexSearchResponseDtos, ((this.tagTypeIndexSearchResponseDtos!= null)&&(!this.tagTypeIndexSearchResponseDtos.isEmpty())))); copy.tagTypeIndexSearchResponseDtos = null; if (copyTagTypeIndexSearchResponseDtos!= null) { List<TagTypeIndexSearchResponseDto> uniqueTagTypeIndexSearchResponseDtosl = copy.getTagTypeIndexSearchResponseDtos(); uniqueTagTypeIndexSearchResponseDtosl.addAll(copyTagTypeIndexSearchResponseDtos); if (nestTagTypeIndexSearchResponseDtosShouldBeCopiedAndSet == Boolean.TRUE) { List<TagTypeIndexSearchResponseDto> sourceNestTagTypeIndexSearchResponseDtos; sourceNestTagTypeIndexSearchResponseDtos = (((this.nestTagTypeIndexSearchResponseDtos!= null)&&(!this.nestTagTypeIndexSearchResponseDtos.isEmpty()))?this.getNestTagTypeIndexSearchResponseDtos():null); @SuppressWarnings("unchecked") List<TagTypeIndexSearchResponseDto> copyNestTagTypeIndexSearchResponseDtos = ((List<TagTypeIndexSearchResponseDto> ) strategy.copy(LocatorUtils.property(locator, "nestTagTypeIndexSearchResponseDtos", sourceNestTagTypeIndexSearchResponseDtos), sourceNestTagTypeIndexSearchResponseDtos, ((this.nestTagTypeIndexSearchResponseDtos!= null)&&(!this.nestTagTypeIndexSearchResponseDtos.isEmpty()))));
@Test public void testGetFacetsResponseWithEmptyResponseDto() { ElasticsearchResponseDto elasticsearchResponseDto = new ElasticsearchResponseDto(); List<Facet> facets = elasticsearchHelper.getFacetsResponse(elasticsearchResponseDto, BUSINESS_OBJECT_DEFINITION_SEARCH_INDEX_NAME, TAG_SEARCH_INDEX_NAME); assertThat("Facet size is not equal to 0.", facets.size(), equalTo(0)); }