if (siglaCurricularCourse.getBib_princ_2() != null && siglaCurricularCourse.getBib_princ_2().length() > bib_princ_2.length()) { bib_princ_2 = siglaCurricularCourse.getBib_princ_1(); } if (siglaCurricularCourse.getBib_princ_3() != null && siglaCurricularCourse.getBib_princ_3().length() > bib_princ_3.length()) { bib_princ_3 = siglaCurricularCourse.getBib_princ_3(); } if (siglaCurricularCourse.getBib_sec_1() != null && siglaCurricularCourse.getBib_sec_1().length() > bib_sec_1.length()) { bib_sec_1 = siglaCurricularCourse.getBib_sec_1(); } if (siglaCurricularCourse.getBib_sec_2() != null && siglaCurricularCourse.getBib_sec_2().length() > bib_sec_2.length()) { bib_sec_2 = siglaCurricularCourse.getBib_sec_2(); } if (siglaCurricularCourse.getBib_sec_2() != null && siglaCurricularCourse.getBib_sec_2().length() > bib_sec_2.length()) { bib_sec_2 = siglaCurricularCourse.getBib_sec_2(); }
System.out.println("update da bibliografia concludo");
	private void updateBibliography(		IDisciplinaExecucao executionCourse,		List siglaCurricularCourses,		PersistenceBroker broker)		throws ExcepcaoPersistencia {		List bibliography = new ArrayList();		String bib_princ_1 = "";		String bib_princ_2 = "";		String bib_princ_3 = "";		String bib_sec_1 = "";		String bib_sec_2 = "";		String bib_sec_3 = "";		Iterator iter = siglaCurricularCourses.iterator();		while (iter.hasNext()) {			Curr_licenciatura siglaCurricularCourse =				(Curr_licenciatura) iter.next();			if (siglaCurricularCourse.getBib_princ_1() != null				&& siglaCurricularCourse.getBib_princ_1().length()					> bib_princ_1.length()) {				bib_princ_1 = siglaCurricularCourse.getBib_princ_1();			}			if (siglaCurricularCourse.getBib_princ_2() != null				&& siglaCurricularCourse.getBib_princ_2().length()					> bib_princ_2.length()) {				bib_princ_2 = siglaCurricularCourse.getBib_princ_1();			}			if (siglaCurricularCourse.getBib_princ_3() != null				&& siglaCurricularCourse.getBib_princ_3().length()					> bib_princ_3.length()) {				bib_princ_3 = siglaCurricularCourse.getBib_princ_3();			}			if (siglaCurricularCourse.getBib_sec_1() != null				&& siglaCurricularCourse.getBib_sec_1().length()					> bib_sec_1.length()) {				bib_sec_1 = siglaCurricularCourse.getBib_sec_1();			}			if (siglaCurricularCourse.getBib_sec_2() != null				&& siglaCurricularCourse.getBib_sec_2().length()					> bib_sec_2.length()) {				bib_sec_2 = siglaCurricularCourse.getBib_sec_2();			}			if (siglaCurricularCourse.getBib_sec_2() != null				&& siglaCurricularCourse.getBib_sec_2().length()					> bib_sec_2.length()) {				bib_sec_2 = siglaCurricularCourse.getBib_sec_2();			}		}		if (bib_princ_1.length() > 0) {			bibliography.add(				new BibliographicReference(					executionCourse,					bib_princ_1,					"",					"",					"",					new Boolean(false)));		}		if (bib_princ_2.length() > 0) {			bibliography.add(				new BibliographicReference(					executionCourse,					bib_princ_2,					"",					"",					"",					new Boolean(false)));		}		if (bib_princ_3.length() > 0) {			bibliography.add(				new BibliographicReference(					executionCourse,					bib_princ_3,					"",					"",					"",					new Boolean(false)));		}		if (bib_sec_1.length() > 0) {			bibliography.add(				new BibliographicReference(					executionCourse,					bib_sec_1,					"",					"",					"",					new Boolean(true)));		}		if (bib_sec_2.length() > 0) {			bibliography.add(				new BibliographicReference(					executionCourse,					bib_sec_2,					"",					"",					"",					new Boolean(true)));		}		if (bib_sec_3.length() > 0) {			bibliography.add(				new BibliographicReference(					executionCourse,					bib_sec_3,					"",					"",					"",					new Boolean(true)));		}		Iterator iter2 = bibliography.iterator();		while (iter2.hasNext()) {			IBibliographicReference reference =				(IBibliographicReference) iter2.next();			try {				broker.store(reference);			} catch (PersistenceBrokerException e) {				System.out.println("a referncia bibliogrfica j existe");			}		}	}