}
//we do a last resort search if we have to and haven't done it already
if (!mainViewHelper.hasLastResortSearchDone()
&& (mainViewHelper.noMPIMatchWasFound()
|| mainViewHelper.noLPIMatchWasFound())) {
SearchProcessResult searchProcessResult = null;
if (mainViewHelper.noMPIMatchWasFound()
&& mainViewHelper.noLPIMatchWasFound()) {
searchProcessResult = mainViewHelper.findPerson(Server.MPI_LPI, mpiUpdatePersonWrapper, true);
if (searchProcessResult.getType() == SearchProcessResult.Type.LIST) {
showSearchResults(new SearchServerResponse(Server.MPI_LPI, searchProcessResult.getData().getPersonList()), true);
return;
}
} else if (mainViewHelper.noMPIMatchWasFound()
&& !mainViewHelper.noLPIMatchWasFound()) {
searchProcessResult = mainViewHelper.findPerson(Server.MPI, mpiUpdatePersonWrapper, true);
if (searchProcessResult.getType() == SearchProcessResult.Type.LIST) {
showSearchResults(searchProcessResult.getData(), true);
return;
}
} else if (!mainViewHelper.noMPIMatchWasFound()
&& mainViewHelper.noLPIMatchWasFound()) {
searchProcessResult = mainViewHelper.findPerson(Server.LPI, lpiUpdatePersonWrapper, true);
if (searchProcessResult.getType() == SearchProcessResult.Type.LIST) {
showSearchResults(new SearchServerResponse(Server.LPI, searchProcessResult.getData().getPersonList()), true);
return;
}
}
mainViewHelper.setLastResortSearchDone(true);
}