Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-14-2008, 06:34 PM
Member
 
Join Date: Aug 2008
Posts: 1
appi_usa is on a distinguished road
Need to filter the hash set which is dtoring my results
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?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about hash tables behrk2 New To Java 2 07-08-2008 06:40 PM
web content filter or internet filter sundarjothi Advanced Java 3 05-15-2008 01:36 PM
Hash table with double hashing Java Tip java.lang 0 04-12-2008 10:43 PM
Hash table with separate chaining Java Tip java.lang 0 04-12-2008 10:42 PM
Hash Table help rhm54 New To Java 0 02-08-2008 03:25 AM


All times are GMT +3. The time now is 09:01 AM.


VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org