private DistrictModel dummyDataDistrict() { final DistrictModel districtModel = new DistrictModel(); // modelService.create(DistrictModel.class); // new DistrictModel(); districtModel.setCode("TEST-DISTRICT-CODE"); districtModel.setName("TEST-DISTRICT-NAME-EN", Locale.ENGLISH); districtModel.setName("TEST-DISTRICT-NAME-ZH", Locale.CHINESE); final CityModel cityModel = new CityModel(); // modelService.create(CityModel.class); //new CityModel(); cityModel.setCode("TEST-CITY-CODE"); cityModel.setName("TEST-CITY-NAME-EN", Locale.ENGLISH); cityModel.setName("TEST-CITY-NAME-ZH", Locale.CHINESE); districtModel.setCity(cityModel); return districtModel; }
// Convenience method for returning a Stadium private CityModel dummyDataCity() { final CityModel cityModel = new CityModel(); cityModel.setActive(Boolean.TRUE); cityModel.setCode("TEST-CITY-CODE"); cityModel.setName( "TEST-CITY-NAME-EN", Locale .ENGLISH); // if just new CityModel(), then here: [mjava.lang.IllegalStateException: // there is no LocaleProvider for (detached) model // de.hybris.platform.servicelayer.model.ItemModelContextImpl@6b6955aa cityModel.setName("TEST-CITY-NAME-ZH", Locale.CHINESE); final RegionModel regionModel = new RegionModel(); regionModel.setIsocode("TEST-REGION-ISOCODE"); regionModel.setActive(Boolean.TRUE); regionModel.setName("TEST-REGION-NAME-EN", Locale.ENGLISH); regionModel.setName("TEST-REGION-NAME-ZH", Locale.CHINESE); cityModel.setRegion(regionModel); return cityModel; }