I override the Object.equals method  compare ids.

something like:

public class MyClass {
    public boolean equals( Object obj ) {
        if ( obj == null || !(obj instanceof MyClass) ) return false;
        else return ( ((MyClass) obj).id == this.id );
    }
}

cheers - richard

-----Original Message-----
From: Gustavo Pistoia [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 11:36 AM
To: [EMAIL PROTECTED]
Subject: [castor-dev] Equals ?


I wrote "org.exolab.castor.builder.equalsmethod=true" in my
castor.properties but
the classes generated has no equals method. What is going on? Or how can I
compare two objects?
Gracias, Thanks.


______________________________________________
Ing. Gustavo Rafael Pistoia
CDA Inform�tica S.A.
TE: 4343-5200.
Int (6329) 4566.

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to