-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: equals() method (Beat a dead horse)
PostPosted: Fri Jul 16, 2010 9:00 pm 
Newbie

Joined: Sat Nov 29, 2008 10:56 am
Posts: 8
Ok,

I have searched through tons of posts dating back to 2004 on the issue of overriding the .equals() method. I was wondering what the best way to override the .equals() method is today? My situation is that my entity classes are at times proxy instances so I know that I can't use the normal "if (getClass() != obj.getClass())" method since a proxy instance will always fail this check.

What is the general approach for comparing normal entity objects that may be proxies?

Thanks,

Marty


Top
 Profile  
 
 Post subject: Re: equals() method (Beat a dead horse)
PostPosted: Sun Jul 18, 2010 12:08 am 
Newbie

Joined: Thu Jul 15, 2010 6:44 am
Posts: 13
Hi Marty,

Try checking this article http://community.jboss.org/wiki/EqualsAndHashcode.

also there is a link to another article from website onjava.com.

Hope that helps.

_________________
Vikram.
Http://enterprisejava4u.blogspot.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.