@Override public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
  if ((null == obj) || (getClass() != obj.getClass())) {
    return false;
  }
  final Entity other=(Entity)obj;
  return (id == other.id);
}

@ Override public boolean equals ( Object obj ) { if ( this == obj ) { return true ; } if ( ( null == obj ) || ( getClass ( ) != obj . getClass ( ) ) ) { return false ; } final Entity other = ( Entity ) obj ; return ( id == other . id ) ; }
two entities are equal if their ids are equal
