コード例 #1
0
 /** Get a schedule by id */
 @Override
 public ScheduleSOAP getSchedule(long id) {
   Schedule mdschd = schad.getSchedule(id);
   if (mdschd == null) {
     return new ScheduleSOAP();
   }
   return toScheduleSOAP(mdschd);
 }
コード例 #2
0
 /** Update existing schedule */
 @Override
 public ScheduleSOAP updateSchedule(ScheduleSOAP scheduleSOAP, long id, String username) {
   User user = usrad.getUser(username);
   if (user == null) {
     return new ScheduleSOAP();
   }
   if (schad.getSchedule(id) == null) {
     return new ScheduleSOAP();
   }
   Schedule mdschd = toScheduleModel(scheduleSOAP);
   mdschd.setUser(user);
   mdschd.setUpdatedTime(new Date().getTime());
   mdschd = schad.updateSchedule(id, mdschd);
   if (mdschd == null) {
     return new ScheduleSOAP();
   }
   scheduleSOAP = toScheduleSOAP(mdschd);
   return scheduleSOAP;
 }