Why not just have an isNull(propertyName) method rather than litter classes
with hasSpouse, hasX, has Y? 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of David Ross
Sent: Tuesday, October 25, 2005 11:36 AM
To: [email protected]
Subject: RE: [CFCDev] CFC return types

the cool thing is that by having a hasSpouse() and a getSpouse() that throws
NotMarried, you leave the choice up the client (thus it's a good practice to
put "Throws: NotMarriedException when there is no spouse"
into the getSpouse()'s hint).

-Dave

>>> [EMAIL PROTECTED] 10/25/2005 9:56:13 AM >>>
>I think that's Barney's point. If you're going to call getSpouse(),
you
should already know that the person has a spouse. You shouldn't call
getSpouse() and then check the result to see if a the person had a spouse.
Nor should you call getSpouse() and look for an exception to let you know
that person didn't have a spouse.

Patrick's was one of the best explanations I have seen so far.

M!ke


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm 

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected] 



-----------------------------------------
CONFIDENTIALITY NOTICE: This email and any attachments may contain
confidential information that is protected by law and is for the sole use of
the individuals or entities to which it is addressed. If you are not the
intended recipient, please notify the sender by replying to this email and
destroying all copies of the communication and attachments. Further use,
disclosure, copying, distribution of, or reliance upon the contents of this
email and attachments is strictly prohibited. To contact Albany Medical
Center, or for a copy of our privacy practices, please visit us on the
Internet at www.amc.edu.



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]





----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to