@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof ItemSubjectClp)) { return false; } ItemSubjectClp itemSubject = (ItemSubjectClp) obj; ItemSubjectPK primaryKey = itemSubject.getPrimaryKey(); if (getPrimaryKey().equals(primaryKey)) { return true; } else { return false; } }