} else if (roleType.equals(RoleType.GRANT_OWNER)){ return "B" + person.getGrantOwner().getNumber();
} else if (roleType.equals(RoleType.GRANT_OWNER)) { if (person.getGrantOwner() != null) { return "B" + person.getGrantOwner().getNumber(); } else { throw new DomainException("error.person.addingInvalidRole", RoleType.GRANT_OWNER .getName()); }
	private static String generateNewUsername(String oldUsername,			RoleType roleType, IPerson person) {		if (oldUsername.startsWith("INA")				|| roleType.equals(RoleType.MASTER_DEGREE_CANDIDATE)) {			return oldUsername;		}		if (roleType.equals(RoleType.TEACHER)) {		    return "D" + person.getTeacher().getTeacherNumber();		} else if (roleType.equals(RoleType.EMPLOYEE))            return "F" + person.getEmployee().getEmployeeNumber();		else if (roleType.equals(RoleType.STUDENT)) {            IStudent student = person.getStudentByType(DegreeType.MASTER_DEGREE);            if (student != null) {                return "M" + student.getNumber();            }            student = person.getStudentByType(DegreeType.DEGREE);            if (student != null) {                return "L" + student.getNumber();            }            throw new DomainException("error.person.addingInvalidRole", RoleType.STUDENT.getName());        } else if (roleType.equals(RoleType.GRANT_OWNER)){            return "B" + person.getGrantOwner().getNumber();        }		return oldUsername;	} /*