@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 Department)) {
            return false;
        }
        Department other = (Department) object;
        if ((this.idDepartment == null && other.idDepartment != null) || (this.idDepartment != null && !this.idDepartment.equals(other.idDepartment))) {
            return false;
        }
        if ((this.nameDepartment == null && other.nameDepartment != null) || (this.nameDepartment != null && !this.nameDepartment.equals(other.nameDepartment))) {
            return false;
        }
        
        return true;
    }