Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

criteriaFind

 
Andrew Douglas
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a question.
In assignment is said "In the event of an invalid field name being provided as part of the criteria the behavior of this method is the same as if no records matched correctly specified criteria."
Does it mean to return to client empty DataInfo array or null?
Thank you. Andrew.
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Andrew,
The choice is probably up to you provided you can defend it. What I have done, when I determine that the criteria is invalid is immediately bug out like this:

That is the same thing that happens (although in a different manner since I gather all matching DataInfo's into an ArrayList) when I have no matching records.
Hope this helps
Michael Morris
 
Andrew Douglas
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Michael.
I implemented it the same way as you said.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic