コード例 #1
0
 public boolean generateWeeklyEventForAllCourses() {
   HibernateSupport.beginTransaction();
   for (WeeklyEvent we : etm.getWeeklyEvents()) {
     we.deleteFromDB();
   }
   HibernateSupport.commitTransaction();
   etm.clearWeeklyEvents();
   List<Course> courses = bc.getCoc().getCourseTableModel().getAllCourses();
   boolean result = true;
   for (Course c : courses) {
     if (!generateWeeklyEventFor(c)) {
       LoggingFunctions.printError("Could not generate weekly event for " + c.getId(), "-");
       result = false;
     }
   }
   return result;
 }
コード例 #2
0
 private void reloadTableData() {
   weeklyEvents = HibernateSupport.readMoreObjects(WeeklyEvent.class, null, true);
 }