Best and easiest advice is: Use commons-lang ;)
http://jakarta.apache.org/commons/lang/api/org/apache/commons/lang/builder/H
ashCodeBuilder.html
and
http://jakarta.apache.org/commons/lang/api/org/apache/commons/lang/builder/T
oStringBuilder.html

Regarding hashCode write your own following the guidelines written here:
(which is what commons-lang has done)
http://java.sun.com/docs/books/effective/chapters.html  (Read Chapter 3)

/max

----- Original Message -----
From: "Matt Raible" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, December 29, 2002 4:47 PM
Subject: RE: [Hibernate] CodeGenerator


>
> >
> > This is more or less what commons-lang's reflectionToString
> > does (which is what Gavin's patch will make the CodeGenerator do now)
> >
> > But what about your hashCode ?
> >
> > /max
> >
>
> I'm looking for advice on how to implement an equals() and hashCode()
> method in my base class.  Any suggestions are appreciated.
>
> Thanks,
>
> Matt
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> hibernate-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel
>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to