• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Find function

 
Olena Golub
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have one confusion about the find function.

After reading the database I represent every record as one String-Array (String []). I have one Record class that wraps this array. This class has only two fields (String[] and boolean- deleted flag) with following constructor:
Record (String[], boolean)
I don�t have any additional fields (name, location, size� etc.).
The name of fields and the values will be read dynamically. If some new field appears in the database, I don�t need to change nothing in code.
But my specification says
"It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user."

It�s mean that I need to know the position number of the name and location. And I have only one idea to define two constants with the position number.




How do you think is it correct?
Are there any possibilities not to change the dynamical reading of the records? Do you have another idea?

Thanks for your replies!
Olena

[ March 29, 2005: Message edited by: Olena Golub ]
[ March 29, 2005: Message edited by: Olena Golub ]
 
Olena Golub
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ups, my explanation was not completed. I have corrected it. Please review it!
Thanks a lot!
Regards,
Olena
[ March 29, 2005: Message edited by: Olena Golub ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic