I have a BaseComponent that creates an objectID (a UUID) for all objects during objectcreation. Then I have an isEqual method in the BaseComponent that compares objectIDs.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Barney Boisvert Sent: Tuesday, October 18, 2005 10:15 AM To: [email protected] Subject: Re: [CFCDev] Easy way to check if oneCFC == twoCFC? And for that matter, you could encapsulate the comparison too, and just call it isEqual. Unfortunately can't call it equals, because CF will bitch that that's an existing java method, even though you can't actually call it. cheers, barneyb On 10/18/05, Bill Rawlinson <[EMAIL PROTECTED]> wrote: > While I'm probably just stating the obvious here you could encapsulate > the system.getIdentityHashCode method into the component.. > > so the component could have a method, getIdentity() (or something) and > then you could just say obj1.getIdentity() EQ obj2.getIdentity() - i > shortened the name because in your usage you don't care if it is a > hashcode or not, you just care that it uniquely identifies your > component. > > Bill > > On 10/17/05, Mark Mandel <[EMAIL PROTECTED]> wrote: > > Thanks for the input - but unfortunatley it doesn't seem to help. > > > > It seems that using the System.identityHashCode() is the only way to do it. > > > > I was looking for something more elegent, but this looks to be it! > > > > Regards, > > > > Mark > > > > On 18/10/05, Fabio Terracini <[EMAIL PROTECTED]> wrote: > > > I'm not sure how to verify if they are the _same instance_, but > > > you can verify if they are an _instance of the same CFC_ by checking > > > their metadata. > > > > > > getMetaData(myCFC1).name EQ getMetaData(myCFC2).name > > > > > > The name will be the fully qualified path: > > > org.cfczone.listserv.Component > > > > > > []s > > > Fabio Terracini > > > > -- > > E: [EMAIL PROTECTED] > > W: www.compoundtheory.com > > ICQ: 3094740 > > > > > > ---------------------------------------------------------- > > 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] > > > > > > > > > -- > [EMAIL PROTECTED] > http://blog.rawlinson.us > > If you want Gmail - just ask. > > > ---------------------------------------------------------- > 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] > > > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 100 invites. bnljqNrzuqqw{ v˲ryuزy~zf! 벻o {qwv˦yU˞džx`7˦ٞjG筨 j{ryڂwvrz7+j)nWjo}ǽΉ ---------------------------------------------------------- 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]
