Ejemplo n.º 1
0
  @Override
  public List<CourseBean> getCourseList() throws GenericBusinessException {

    CourseService courseService = new CourseService();
    List list = courseService.getCourseList();
    List<CourseBean> list1 = new ArrayList<>();
    for (int i = 0; i < list.size(); i++) {
      list1.add(new CourseBean((Course) list.get(i)));
    }
    return list1;
  }
Ejemplo n.º 2
0
  @Override
  public List<CourseBean> getCourseList(int startIndex, int endIndex)
      throws GenericBusinessException {
    if (startIndex < 1) {
      startIndex = 1;
    }
    if ((endIndex - startIndex) < 0) {
      // Just return an empty list.
      return new ArrayList();
    }
    CourseService courseService = new CourseService();
    List list = courseService.getCourseList(startIndex, endIndex);

    List<CourseBean> list1 = new ArrayList<>();
    for (int i = 0; i < list.size(); i++) {

      list1.add(new CourseBean((Course) list.get(i)));
    }

    return list1;
  }