• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Which DB Fields are Searchable?

 
David Reck
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The assignment does not specify which fields the user should be allowed to search with. Does this mean that all fields should be searchable?
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3820
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any column should be searchable! If you see the input string (as specified by the instructions) for the criteriaFind() method you'll observe that the clinet must be able to give "any_column_name=any_value". This means, the column names are not hardcoded but are given by the client. Although the client (for this project) does not require searching for any column other than TO and FROM but that does not mean you should hardcode that in criterialFind().
HTH,
Paul.
------------------
Get Certified, Guaranteed!
(Now Revised for the new Pattern)
www.enthuware.com/jqplus

Your guide to SCJD exam!
www.enthuware.com/jdevplus
Try out the world's only WebCompiler!
www.jdiscuss.com
 
Val Dra
Ranch Hand
Posts: 439
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Paul , i'd like to know a better way how to build this method. Because searching record by record is slow so what i do is i have 2 hashTables one contains keys "From" column with an array of integers of record number and the other one contains keys "Destination" and again array of integers of record numbers associated with them. This way i only have to search few records because i compare integers if they match then i display a record. This method is not gonna work for me if i have to search by other fields. Can you suggest me an effective way ?
 
Aleksey Matiychenko
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create a generic Index Class that maintains poiners to any specified field.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic