Hello Prince,

In primary class files  hashcode method
public int hashCode()
{

        return  variablename.hashcode();
}

and add one more method in same class

public String toString()
{
        variablename.toString();
}

and try compliling it , I think that this will solve the problem

bye!!!!!!!1


With regards,

Anil S. Rawlani,
Global Tele-Systems Ltd,
Phone: 7612929, 7684111 Ext:3271.


> -----Original Message-----
> From: Prince Jacob Alex [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, November 22, 2000 7:22 PM
> To:   [EMAIL PROTECTED]
> Subject:      Need help in PK Class
>
> Hello,
>
>    I am developing some sample EJB's using EJB ver 1.1 and weblogic as
> the container. According to EJB 1.1 spec we need to override the methods
> boolean equals() and int hashcode() in the PK class.
>
>   My doubt is that if my primary key is a String, then how do I override
> the method int hashCode(). I can cast the return as string but that
> dosen't make much of sense.
>
> Please let me know if I am missing something.
>
> Thanks
>
> Prince
>
> ==========================================================================
> =
> 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