Package com.m4f.business.domain

Examples of com.m4f.business.domain.CourseCatalog


  @Override
  //@Cacheable(cacheName="coursesCatalog")
  public CourseCatalog getCourseCatalogByCourseId(Long courseId, Locale locale) throws Exception {   
    String filter = "courseId == courseIdParam && lang == langParam";
    String params = "java.lang.String courseIdParam, java.lang.String langParam";
    CourseCatalog course = this.DAO.findEntity(CourseCatalog.class, filter,
        params, new Object[] {courseId, locale.getLanguage()});
    return course;
  }
View Full Code Here


        for (Integer page : paginator.getTotalPagesIterator()) {
                int start = (page - 1) * RANGE;
                int end = (page) * RANGE;
         Collection<Course> courses = this.courseService.getCoursesBySchool(school.getId(), null, null, start, end);
         for(Course course : courses) {
             CourseCatalog c_es = this.catalogService.getCourseCatalogByCourseId(course.getId(), new Locale("es"));
             CourseCatalog c_eu = this.catalogService.getCourseCatalogByCourseId(course.getId(), new Locale("eu"));
             if(c_es == null) {
               LOGGER.finest("Id: " + course.getId());
               LOGGER.finest("SchoolId: " + course.getSchool());
             }
           }
View Full Code Here

      region = this.getRegionsMap().get(locale.getLanguage()).get(town.getRegion());
      province = this.getProvincesMap().get(locale.getLanguage()).get(town.getProvince());
    }
    List<CourseCatalog> catCourses = new ArrayList<CourseCatalog>();
    for(Course course : courses) {
      CourseCatalog catalog = new CourseCatalog(course, locale.getLanguage(),
          school, provider.getName(), province.getName(), region.getName(), town.getName());
      CourseCatalog catalogOld = catalogService.getCourseCatalogByCourseId(course.getId(), locale);
      if(catalogOld != null) {
        catalog.setId(catalogOld.getId());
      }
      catCourses.add(catalog);
    }
    catalogService.save(catCourses);
  }
View Full Code Here

    if(towns != null && towns.size() > 0) {
      town = towns.get(0);
      region = this.getRegionsMap().get(locale.getLanguage()).get(town.getRegion());
      province = this.getProvincesMap().get(locale.getLanguage()).get(town.getProvince());
    }           
    CourseCatalog catalog = new CourseCatalog(course, locale.getLanguage(),
      school, provider.getName(), province.getName(), region.getName(), town.getName());
   
    CourseCatalog catalogOld = catalogService.getCourseCatalogByCourseId(course.getId(), locale);
    if(catalogOld != null) {
      catalog.setId(catalogOld.getId());
    }
    LOGGER.info(new StringBuffer("Fin generacion instancia de catalago del curso: ")
      .append(course.getId()).append(" y locale: ").append(locale).toString());
    catalogService.save(catalog);
View Full Code Here

    if(towns != null && towns.size() > 0) {
      town = towns.get(0);
      region = this.serviceLocator.getTransversalService().getRegionsMap().get(locale.getLanguage()).get(town.getRegion());
      province = this.serviceLocator.getTransversalService().getProvincesMap().get(locale.getLanguage()).get(town.getProvince());
    }           
    CourseCatalog catalog = new CourseCatalog(course, locale.getLanguage(),
      school, provider.getName(), province.getName(), region.getName(), town.getName());
   
    CourseCatalog catalogOld =
      this.serviceLocator.getCatalogService().getCourseCatalogByCourseId(course.getId(), locale);
   
    if(catalogOld != null) {
      catalog.setId(catalogOld.getId());
    }
   
    LOGGER.info(new StringBuffer("Fin generacion instancia de catalago del curso: ")
      .append(course.getId()).append(" y locale: ").append(locale).toString());
    this.serviceLocator.getCatalogService().save(catalog);
View Full Code Here

TOP

Related Classes of com.m4f.business.domain.CourseCatalog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.