Package com.m4f.business.domain.extended

Examples of com.m4f.business.domain.extended.Region


    String townName = school.getContactInfo() != null &&
        school.getContactInfo().getCity() != null ? school.getContactInfo().getCity() : "";   
    List<Town> towns = territorialService.findTownsByName(townName, locale);   
    Town town = new Town();
    Province province = new Province();
    Region region = new Region();
    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());
    }
    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);
View Full Code Here


   
    List<Town> towns = territorialService.findTownsByName(townName, locale);
   
    Town town = new Town();
    Province province = new Province();
    Region region = new Region();
    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());
    }
View Full Code Here

  @Secured("ROLE_ADMIN")
  @RequestMapping(value="/delete/{regionId}", method=RequestMethod.GET)
  public String delete(@PathVariable Long regionId, Model model, Locale locale,
      @RequestHeader("referer") String referer, @RequestHeader("Host") String host) {
    try {
      Region region = this.serviceLocator.getTerritorialService().getRegion(regionId, locale);
      this.serviceLocator.getTerritorialService().delete(region, locale);
    } catch(Exception e) {
      LOGGER.log(Level.SEVERE, StackTraceUtil.getStackTrace(e));
      return "common.error";
    }
View Full Code Here

      //Town town = this.getTownByName(townName, locale);

      Town town = this.serviceLocator.getTerritorialService().getTownsMap(locale).get(townName);
     
      Province province = new Province();
      Region region = new Region();
     
      if(town != null && town.getId() != null) {
        region = this.serviceLocator.getTerritorialService().getRegionsMap(locale).get(town.getRegion());
        province = this.serviceLocator.getTerritorialService().getProvincesMap(locale).get(town.getProvince());
      } else {
View Full Code Here

    List<Town> towns = this.serviceLocator.getTerritorialService().
      findTownsByName(townName, locale);
   
    Town town = new Town();
    Province province = new Province();
    Region region = new Region();
    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) {
View Full Code Here

      //Town town = this.getTownByName(townName, locale);

      Town town = this.serviceLocator.getTerritorialService().getTownsMap(locale).get(townName);
     
      Province province = new Province();
      Region region = new Region();
     
      if(town != null && town.getId() != null) {
        region = this.serviceLocator.getTerritorialService().getRegionsMap(locale).get(town.getRegion());
        province = this.serviceLocator.getTerritorialService().getProvincesMap(locale).get(town.getProvince());
      } else {
View Full Code Here

TOP

Related Classes of com.m4f.business.domain.extended.Region

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.