@Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Subject)) {
            return false;
        }
        Subject other = (Subject) object;
        if ((this.idSubject == null && other.idSubject != null) || (this.idSubject != null && !this.idSubject.equals(other.idSubject))) {
            return false;
        }
        if ((this.nameSubject == null && other.nameSubject != null) || (this.nameSubject != null && !this.nameSubject.equals(other.nameSubject))) {
            return false;
        }
        return true;
    }