Package beans.directory.district.entity

Examples of beans.directory.district.entity.AddressDistrict


                }
                HashSet<AddressObject> children = childrenMap.get(it);
                if (children != null && children.size() != 0) {
                    //создаем несколько записей
                    for (AddressObject chield : children) {
                        AddressDistrict addressDistrict = new AddressDistrict();
                        addressDistrict.setTitle(chield.getTitle());
                        addressDistrict.setAddressObject(it);
                        int pos = Math.abs(chield.getTitle().hashCode()) % districtList.size();
                        addressDistrict.setDistrict(districtList.get(pos));
                        manager.persist(addressDistrict);
                    }
                } else {
                    //создаем новую запись
                    AddressDistrict addressDistrict = new AddressDistrict();
                    addressDistrict.setTitle("");
                    addressDistrict.setAddressObject(it);
                    int pos = Math.abs(it.getTitle().hashCode()) % districtList.size();
                    addressDistrict.setDistrict(districtList.get(pos));
                    manager.persist(addressDistrict);
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of beans.directory.district.entity.AddressDistrict

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.