public String searchLegalProfessionalsByPerson() {
String navVal = UIConstants.NAVIGATION_FAILURE;

ResultsBean resultsBean = UIUtils.getFacesBeanByName(
ManagedBeanConstants.BEAN_RESULTSBEAN, ResultsBean.class);

resultsBean.clearResult(super.getResultKey());

if (!isValid()) {
return UIConstants.NAVIGATION_FAILURE;
} else {
SearchPerson sp = new SearchPerson("SearchPerson");

sp.setFirstName(myFirstName);
sp.setMiddleName(myMiddleName);
sp.setLastName(myLastName);
sp.setCity(myCity);
sp.setCountry(getCountry());
sp.setState(getState());
sp.setRetrieveOnlyCurrentInstances(true);
sp.setActiveSearch(super.getActiveSearch());
sp.setType(super.getType());

try {
sp = (SearchPerson)UIUtils.executeOperation(sp);
} catch (OMIException omi) {
UIUtils.flashError(omi, this, "searchLegalProfessionalsByPerson()", "An Error occurred" +
" while trying to search for the legal professional.");

return UIConstants.NAVIGATION_FAILURE;
}
System.out.println("Begining If loop");
if (sp.getPeople() != null && sp.getPeople().length > 0 && sp.getPeople()[0] != null) {
Set results = new HashSet(Arrays.asList(sp.getPeople()));

System.out.println(results.size());
System.out.println("End of First If");
resultsBean.addResult(super.getResultKey(), results);
if (super.getResultKey().equals(VendorViewLegalProfes sionalBean.LEGALPROFESSIONALSSEARCHRESULT)) {
navVal = UIUtils.getFacesBeanByName(ManagedBeanConstants.BE AN_LEGALPROFESSIONALBEAN,
LegalProfessionalBean.class).actionGotoView(result s);
System.out.println(results.size());
} else {
// The *Body.jsp page will set the Search Result.
resultsBean.addResult(super.getResultKey(), results);
navVal = UIConstants.NAVIGATION_SUCCESS;
}
} else {
UIUtils.flashWarn(this, "searchLegalProfessionalsByPerson()", "No Legal Professionals" +
" with the following criteria were found in the Authority.");

return UIConstants.NAVIGATION_FAILURE;
}

}
return navVal;
}
}


This is my code , I am retrieving the people details and storing in a hash set , I want to delete one particular row with a source_id=23456, how can I filter my hash set? Can some one help me out in this.(The hash set will have firstname,lastname, middlename , source_id and soon

In my screen I am searching for andrew, My database returns all profiles of andrews, a person can have multiple profiles.I am storing this results in the hashset.after storing results in hashset, I am trying to delete a particular andrew from the set who is having a source_id as 12345. How can i do that before printing my results in the screen?