This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

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: 4361
39
  • 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.
 
If I had asked people what they wanted, they would have said faster horses - Ford. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!