Well, if your primary key class is a simple wrapper to a int or a long, just
return that in the hashcode!  Plus, you will also need to overload equals(),
and once again, if your primary key is simple, just compare the wrapped int
or long!

If you have a more complex primary key, you will need a smarter hashing
algorithm...

Gene

-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Kapil Vaswani
Sent: Tuesday, July 11, 2000 8:03 AM
To: [EMAIL PROTECTED]
Subject: hashcode function???


hi!!

Sorry if this question sounds trival...
While trying to deploy an entity bean using weblogic i am getting the
folowing error..

        [9.2.9] In EJB Order, the primary key class must implement the
method public int hashCode().

What should this hashcode function do!!!

Thnaks in advance..

Kapil Vaswani
Software Engineer
Infosys Technologies

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to