• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

criteriaFind size

 
tom mcmorrow
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
I completed my criteriaFind()method some time ago, and it seems to work ok. However on reviewing it now my approach seems very long and rather tedious. My approach has 100 lines approx without comments.
Anybody let me know roughly what number of lines was in their method(without comments).
Also i include in my method an adjustment to search tokens to change values where value submitted in criteria string has only 1 word but the column name has 2 -eg "Origin airport". However this seems very specific to FBN and would probably be undesirable in Data class however Specification seems to suggest this is what is required. Any thoughts.
Thanking you all.
tom
[ March 09, 2002: Message edited by: tom mcmorrow ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also i include in my method an adjustment to search tokens to change values where value submitted in criteria string has only 1 word but the column name has 2 -eg "Origin airport".

You only need two tokenizers, on for a comman and one for an equals sign. The field name having two wrods in it is meaningless, and doesn't need any extra code.
As far as the size of my code. The actual criteriaFind method in my Data class was about 10 lines. However it did use two private methods, one to Make a HashSet of the values, and one that checks a record to that Hashset. So maybe 30 lines total.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic