示例#1
0
 public void addCourse(Course course) {
   if (!courses.contains(course)) courses.add(course);
   if (!course.getClients().contains(this)) course.getClients().add(this);
 }
 @AssertTrue(message = "course.full.exception")
 public boolean isValid() {
   int maxCapacity = course.getMaxiumumCapacity();
   return registrations.size() <= maxCapacity;
 }