Registration registration; if (studentNumber == null) { studentNumber = Registration.generateStudentNumber(DegreeType.MASTER_DEGREE); }  StudentKind studentKind = StudentKind.readByStudentType(StudentType.NORMAL); StudentState state = new StudentState(StudentState.INSCRITO); registration = new Registration(person, studentNumber, studentKind, state, false, false, EntryPhase.FIRST_PHASE_OBJ); registration.setInterruptedStudies(false);  return registration;
return new Registration(person, studentNumber, StudentKind.readByStudentType(StudentType.NORMAL), new StudentState( StudentState.INSCRITO), false, false, EntryPhase.FIRST_PHASE_OBJ);
    private Registration createNewRegistration(Person person, Integer studentNumber)	    throws ExcepcaoPersistencia {        Registration registration;        if (studentNumber == null) {            studentNumber = Registration.generateStudentNumber(DegreeType.MASTER_DEGREE);        }        StudentKind studentKind = StudentKind.readByStudentType(StudentType.NORMAL);        StudentState state = new StudentState(StudentState.INSCRITO);        registration = new Registration(person, studentNumber, studentKind, state, false, false,                EntryPhase.FIRST_PHASE_OBJ);        registration.setInterruptedStudies(false);                      return registration;    }