Package org.internna.iwebmvc.model

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


        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

        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

TOP

Related Classes of org.internna.iwebmvc.model.Province

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.