Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Collection

 
Reshma Reddy
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
In my application is there two tables i am using list, for that tables and i am getting confuse how to compare the two table elements and i want the elements that are equal in two tables.

Thanks,
vishnu
 
Srikanth Basa
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please be more specific on what you are asking and how it is related to servlets ?
 
Reshma Reddy
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Srikanth,
i am using spring and hibernate for my application i wrote one DAO for that, by using that i am getting table values.

Thanks,
vishnu
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This still doesn't sound like a servlet question.
Moving to Java In General (intermediate) where collections are discussed.
 
Tamas Jano
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still not specific enough but I presume you want the result to contain the rows that match from the two tables.
Take a look at joins, that might be the thing you need.
 
Reshma Reddy
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tamas,
i have to compare in my java class and after that i have to pass this result to for further method.

Thanks,
vishnu.
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean ask how you want to compare two objects which are populated with the values of table row?
 
Srikanth Basa
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not still clear what you are asking for. If you are asking for comparing the elements in two lists and getting the common elements out, here goes the idea



1.4 Compatible
 
Reshma Reddy
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Srikanth,
Thanks for giving idea, but in my application persons is there more than lack but this one is the better idea to do comparision or is there any another approach for this.

Thanks,
vishnu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic