Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

criteriaFind  RSS feed

 
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!