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;
}