public ArrayList getCourseList() { ArrayList courslisttmp = null; try { FormationDto newfdto = MainFrame.myDaybyday.getFormation(new FormationBusinessPK(name, year)); SectionDto newdto = MainFrame.myDaybyday.getSection( new SectionBusinessPK("GENERALE", newfdto.getFormationId())); if (sectionDto.getVersion().intValue() != newdto.getVersion().intValue() || formationdto.getVersion().intValue() != newfdto.getVersion().intValue()) { courslist = new ArrayList(); sectionDto = newdto; formationdto = newfdto; courslist = new ArrayList(); courslisttmp = MainFrame.myDaybyday.getCoursesOfSection( new SectionBusinessPK("GENERALE", formationdto.getFormationId())); for (int i = 0; i < courslisttmp.size(); ++i) courslist.add(new Course((CourseDto) courslisttmp.get(i))); } } catch (RemoteException e2) { } catch (EntityNotFoundException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } return courslist; }
/** @return */ public int getElementNombre() { try { // TODO Auto-generated method stub FormationDto dto = MainFrame.myDaybyday.getFormation(new FormationBusinessPK(name, year)); if (formationdto.getVersion().intValue() != dto.getVersion().intValue()) { formationdto = dto; SectionBusinessPK sec = new SectionBusinessPK("GENERALE", dto.getFormationId()); try { filieres = new ArrayList(); SectionDto defaults = MainFrame.myDaybyday.getSection(sec); ArrayList filieretmp = MainFrame.myDaybyday.getChildrenOfSection(sec); for (int i = 0; i < filieretmp.size(); ++i) filieres.add(new Section((SectionDto) filieretmp.get(i), this)); } catch (RemoteException e) { } ArrayList matieretmp = null; try { // sectionDto = MainFrame.myDaybyday.getSection(new SectionPK("GENERALE",name,year)); matiere = new ArrayList(); matieretmp = MainFrame.myDaybyday.getSubjectsOfSection(sec); for (int i = 0; i < matieretmp.size(); ++i) matiere.add(new Subject((SubjectDto) matieretmp.get(i), this)); } catch (RemoteException e1) { } } } catch (RemoteException e2) { } catch (EntityNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } return filieres.size() + matiere.size(); }