This would be a safer and more generic equals() method that does not have to be 
changed for different entities.

public boolean equals(Object o){    
  return (o != null && (this.getClass().cast(o)).getId() == this.getId());
}

Have fun.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069301#4069301

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069301
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to