Examples of Province


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

   
    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

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

      //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());
View Full Code Here

Examples of org.internna.iwebmvc.model.Province

    @Test
    public void testParse() {
        assertNull(addressParser.parse(null));
        Address address = new Address();
        address.setProvince(new Province());
        address.getProvince().setId(baseDao.first(Province.class).getId());
        address.setType(new AddressType());
        address.getType().setId(baseDao.first(AddressType.class).getId());
        address = addressParser.parse(address);
        assertNotNull(address.getProvince().getCountry());
View Full Code Here

Examples of org.internna.iwebmvc.model.Province

        if (address != null) {
            if (address.getId() != null) {
                parsed = getDao().find(Address.class, address.getId());
                BeanUtils.copyProperties(address, parsed, new String[] {"id"});
            }
            Province province = address.getProvince();
            if ((province != null) && (province.getId() != null)) address.setProvince(getDao().find(Province.class, province.getId()));
            AddressType type = address.getType();
            if ((type != null) && (type.getId() != null)) address.setType(getDao().find(AddressType.class, type.getId()));
        }
        return parsed;
    }
View Full Code Here

Examples of org.internna.iwebmvc.model.Province

        if (count <= 0) {
            if (logger.isInfoEnabled()) logger.info("State/Province table is empty. Generating data...");
            count = 0L;
            Set<Entry<Object, Object>> provinces = data.entrySet();
            for (Entry<Object, Object> entry : provinces) {
              Province province = new Province();
              province.setProvince((String) entry.getKey());
              province.setCountry(getCountry((String) entry.getValue()));
              dao.create(province, false);
                if (count++ % 25 == 0) {
                    dao.flush();
                    dao.clear();
                }
View Full Code Here

Examples of org.iremake.common.model.Province

                String name = FrameManager.getInstance().showInputDialog("Enter new Province's name:");
                if (name != null) {
                    // TODO selectedNation could be null, setModel could not have been set, than this will fail
                    XList<Province> model = (XList<Province>) provinceList.getModel();
                    // TODO meaningful id
                    Province province = new Province(1, name);
                    model.addElement(province); // the model is the internal list
                }
            }
        });
        removeprovinceButton.addActionListener(new ActionListener() {
View Full Code Here

Examples of org.iremake.common.model.Province

                p.x += 50;
                final ListSelectDialog<Province> dialog = new ListSelectDialog<>("Select Province", scenario.getAllProvinces());
                dialog.setClosingListener(new WindowClosingListener() {
                    @Override
                    public boolean closing() {
                        Province province = dialog.getSelectedElement();
                        if (province != null) {
                            // selectedProvinceID = province.getID();
                        }
                        return true;
                    }
View Full Code Here

Examples of org.iremake.common.model.Province

        // add a nation and a province
        Nation nation = new Nation();
        nation.setProperty(Nation.KEY_NAME, "Test Nation");
        scenario.getNations().addElement(nation);

        Province province = new Province(1, "Test province");
        nation.addProvince(province);

        nation.setProperty(Nation.KEY_CAPITAL, String.valueOf(province.getID()));

        IOManager.saveToXML(Places.None, "test-scenario.xml", scenario);
    }
View Full Code Here

Examples of org.iremake.common.model.Province

        for (int i = 0; i < chunk; i++) {
            if (terrain_underlay[i] != 5) {
                if (!processed.contains(provinces[i])) {
                    Nation nation = nmap.get(countries[i]);
                    String name = pmap.get(provinces[i]);
                    Province province = scenario.createProvince(name);
                    nation.addProvince(province);
                    ppmap.put(provinces[i], province);
                    processed.add(provinces[i]);
                }
            }
View Full Code Here

Examples of org.xrace.model.Province

     * @see wicket.markup.html.form.IChoiceRenderer#getDisplayValue(Object)
     */
    @Override
    public Object getDisplayValue(final Object object)
    {
      final Province province = (Province) object;

      if (province == null)
      {
        return "Indépendant";
      }

      final Locale locale = getLocale();
      if (locale.getLanguage().equals(Locale.FRENCH.getLanguage()))
      {
        return province.getNom();
      }
      else
      {
        return province.getName();
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.