resultCell.setKey(resultColumn.getKey());
if("proposal.resultColumn.proposalOptionalName".equals(cell.getKey())){ proposalNameCell = cell; cell.setKey("lu.resultColumn.proposalOptionalName"); }else if("proposal.resultColumn.proposalOptionalReferenceId".equals(cell.getKey())){ cluId = cell.getValue(); cell.setKey("lu.resultColumn.proposalOptionalReferenceId"); }else if("proposal.resultColumn.proposalId".equals(cell.getKey())){ cell.setKey("lu.resultColumn.proposalId");
private SearchResultRowInfo mapResultRow( String subSearchKey, SearchResultRowInfo row, CrossSearchTypeInfo crossSearchType) { SearchResultRowInfo resultRow = new SearchResultRowInfo(); for(JoinResultMappingInfo resultMapping: crossSearchType.getJoinResultMappings()){ if(subSearchKey.equals(resultMapping.getSubSearchKey())){ for(SearchResultCellInfo cell: row.getCells()){ if(resultMapping.getSubSearchResultParam().equals(cell.getKey())){ SearchResultCellInfo mappedCell = new SearchResultCellInfo(); mappedCell.setKey(resultMapping.getResultParam()); mappedCell.setValue(cell.getValue()); resultRow.getCells().add(mappedCell); break;//FIXME breaks are bad... but there is no map in the cells } } } } return resultRow; } /**
/** * Maps results from multiple searches into a single result row * * @param permutation * @param crossSearchType * @return a mapped SearchResultRowInfo */ private SearchResultRowInfo mapResultRow( Map<String, SearchResultRowInfo> permutation, CrossSearchTypeInfo crossSearchType) { //FIXME this is pretty inefficient to loop through everything... a map structure for the cells might be better SearchResultRowInfo resultRow = new SearchResultRowInfo(); for(JoinResultMappingInfo resultMapping: crossSearchType.getJoinResultMappings()){ for(SearchResultCellInfo cell: permutation.get(resultMapping.getSubSearchKey()).getCells()){ if(resultMapping.getSubSearchResultParam().equals(cell.getKey())){ SearchResultCellInfo mappedCell = new SearchResultCellInfo(); mappedCell.setKey(resultMapping.getResultParam()); mappedCell.setValue(cell.getValue()); resultRow.getCells().add(mappedCell); break;//FIXME breaks are bad... but there is no map in the cells } } } return resultRow; }
cell.setKey(ENTITY_ID_RESULT); cell.setValue(person.getEntityId()); resultRow.getCells().add(cell); cell.setKey(PERSON_ID_RESULT); cell.setValue(person.getPrincipalId()); resultRow.getCells().add(cell); cell.setKey(PRINCIPAL_NAME_RESULT); cell.setValue(person.getPrincipalName()); resultRow.getCells().add(cell); cell.setKey(GIVEN_NAME_RESULT); cell.setValue(person.getName()); resultRow.getCells().add(cell); cell.setKey(DISPLAY_NAME_RESULT); cell.setValue(person.getName() + " (" + person.getPrincipalName() + ")"); resultRow.getCells().add(cell);