• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

criteriaFind Questions?

 
seagullz peizhi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in criteriaFind() it takes in a String "Carrier='SpeedyAir',Origin='SFO'",and we split them as what we want,but when i compare the field name as the db's field name,you know they arenot exactly same,
like "Orgin" as "Orgin airport",so it's wrong with the method getName(),i want to change the criteriastring as "Carrier='SpeedyAir',Origin airport='SFO'",am i right?
maybe it is a simple question,but any help is precious to me 3ks
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Seagullz,
Yep, the field names have to match. What I did was create an interface called FBNConstants which contained an array of the field names and int constants like ORIGIN, DESTINATION, DURATION, etc.
So I would just build my criteria using those constants, for example SCHEMA[CARRIER] would then be the exact field name for carrier.
Hope this helps,
Michael Morris
 
seagullz peizhi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you very much
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic