Exemplo n.º 1
0
  @Override
  @Transactional(readOnly = false)
  public void joinCourse(Customer customer, Course course) {
    course = courseDao.getBySid(course.getSid());
    CustomerSubscription subscription = new CustomerSubscription();
    subscription.setCourse(course);
    subscription.setCustomer(customer);

    customerSubscriptionDao.save(subscription);
  }
Exemplo n.º 2
0
 @Override
 @Transactional(readOnly = true)
 public List<Course> findCoursesToRegister(Customer customer) {
   return courseDao.findRegisterableForCustomer(customer);
 }