• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Which DB Fields are Searchable?

 
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?
 
Enthuware Software Support
Posts: 4428
41
  • 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
 
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 ?
 
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.
 
I didn't say it. I'm just telling you what this tiny ad said.
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic