예제 #1
0
 @Override
 protected void updateFields(Schedule domain, Schedule newDomain) {
   domain.setDayOfWeek(newDomain.getDayOfWeek());
   domain.setWeek(newDomain.getWeek());
   domain.setClassroomId(newDomain.getClassroomId());
   domain.setDisciplineTimeId(newDomain.getDisciplineTimeId());
   domain.setStudyId(newDomain.getStudyId());
 }
예제 #2
0
 @Override
 protected void validate(Schedule domain) {
   try {
     DomainUtil.checkingForNotNull(domain.getWeek());
     DomainUtil.checkingForNotNull(domain.getDayOfWeek());
     DomainUtil.checkingForNotNull(domain.getStudyId());
     DomainUtil.checkingForNotNull(domain.getClassroomId());
     DomainUtil.checkingForNotNull(domain.getDisciplineTimeId());
   } catch (NullPropertyException e) {
     throw new RestServiceException(Response.Status.BAD_REQUEST.getStatusCode());
   }
 }