facebook

not a big deal working but silly code generated

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #231732 Reply

    Here is what I get from a table with composit primary key.
    Just look a the if statements.

    /**
    * Implementation of the equals comparison on the basis of equality of the id components.
    * @param rhs
    * @return boolean
    */
    public boolean equals(Object rhs)
    {
    if (rhs == null)
    return false;
    if (! (rhs instanceof ABCKey))
    return false;
    ABCKey that = (ABCKey) rhs;
    if (this.getA() != null && that.getA() != null)
    {
    if (! this.getA().equals(that.getA()))
    {
    return false;
    }
    }
    if (this.getB() != null && that.getB() != null)
    {
    if (! this.getB().equals(that.getB()))
    {
    return false;
    }
    }
    if (this.getB() != null && that.getB() != null)
    {
    if (! this.getB().equals(that.getB()))
    {
    return false;
    }
    }
    return true;
    }

    #231751 Reply

    Riyad Kalla
    Member

    File for enhancement.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: not a big deal working but silly code generated

You must be logged in to post in the forum log in