A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Certification
»
Developer Certification (SCJD/OCMJD)
Author
find()-method and RecordNotFoundException
mohammad abdellatif
Greenhorn
Joined: Aug 29, 2007
Posts: 24
posted
Jul 29, 2011 01:15:47
0
DBMain.find method throws a RecordNotFoundException, Shall i through it to indicate no matched records are found, or shall I return an empty array.
Roel De Nijs
Bartender
Joined: Jul 19, 2004
Posts: 4355
I like...
posted
Jul 29, 2011 02:28:38
0
mohammad abdellatif wrote:
Shall i through it to indicate no matched records are found
That's what I did. Others just returned an empty array. So both approaches are fine, don't forget to document your decision in choices.txt
SCJA
, SCJP (
1.4
|
5.0
|
6.0
),
SCJD
http://www.javaroe.be/
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: find()-method and RecordNotFoundException
Similar Threads
static method inside a abstract class?
Javadoc: What to document if one exception is caught and another is throwed?
[B&S] does update() need DuplicateKeyException
urlyBird 1.2.3 - findByCriteria method
implementing interface methods within another interface method
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter