aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes How to return multiple records matching the search criteria Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "How to return multiple records matching the search criteria" Watch "How to return multiple records matching the search criteria" New topic
Author

How to return multiple records matching the search criteria

Aruneesh Salhotra
Ranch Hand

Joined: May 12, 2004
Posts: 167
After getting the RMI to work using the Adapter interface, which makes the coding such a blessing, without duplicating much of the code, I am stumped with another question.

It is possible to have multiple results. But findByCriteria is defined as

String[] findByCriteria(String[] criteria)

This has a scope of returning one record.

How is everyone dealing with this.
Kevin Conaway
Ranch Hand

Joined: Jan 27, 2006
Posts: 57
Hi Aruneesh,

What does the comment above that method state?

My "find" method returns int []

Kevin
Aruneesh Salhotra
Ranch Hand

Joined: May 12, 2004
Posts: 167
It returns a list of record numbers. Once I get the int array, I would call readRecord(recNo), for those records to display.
 
jQuery in Action, 2nd edition
 
subject: How to return multiple records matching the search criteria