• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FinderException for findBySomeCriteria(...)

 
Shreyas Reddy
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For a finder method returning a collection of component interfaces, if no entities matching the criteria are found an empty collection is returned. When does such a method throw FinderException?
Thanks,
 
Keerthi P
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... when JDBC calls fail, in which case the core SQLException will be wrapped in the FinderException.
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Keerthi is right--basically a FinderException from a multi-entity finder says, "Something unexpected happened while the finder method was running...", which usually means something related to the database select, although it could be anything else. The Client must assume that if a FinderException comes back from a multi-entity finder that something went wrong during the search for matching entities, but that it has nothing to do with whether there ARE any matching entities.

cheers,
Kathy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic