Package framework.beans.directory.simple.entities

Examples of framework.beans.directory.simple.entities.Name


    @Override
    public void updateNames(HashSet<String> namList) {
        HashSet<String> set = loadDirectory(Name.class);
        for (String nam : namList) {
            if (!set.contains(nam)) {
                Name name = new Name();
                name.setTitle(nam);
                name.setDirty(false);
                manager.persist(name);
                set.add(name.getTitle());
            }
        }
    }
View Full Code Here


                int i = 0;
                for (Object[] line: list) {
                    ClientUniq cu = new ClientUniq();
                    Integer clientID = (Integer) line[0];
                    Surname surname = (Surname) line[1];
                    Name name = (Name) line[2];
                    Patronymic pathronymic = (Patronymic) line[3];

                    cu.surnameID = surname == null ? 0 : surname.getId();
                    cu.nameID = name == null ? 0 : name.getId();
                    cu.pathronID = pathronymic == null ? 0 : pathronymic.getId();
                    cu.dateBorn = (Date) line[4];
                    mapClient.put(cu, clientID);
                }
                System.out.println("End Mapping Clients");
View Full Code Here

        List<Object[]> list = query.getResultList();
        for (Object[] line: list) {
            ClientUniq cu = new ClientUniq();
            Integer emcID = (Integer) line[0];
            Surname surname = (Surname) line[1];
            Name name = (Name) line[2];
            Patronymic pathronymic = (Patronymic) line[3];

            cu.surnameID = surname == null ? 0 : surname.getId();
            cu.nameID = name == null ? 0 : name.getId();
            cu.pathronID = pathronymic == null ? 0 : pathronymic.getId();
            cu.dateBorn = (Date) line[4];
            mapEmc.put(cu, emcID);
        }
    for (LNumberChunk c: lNumberChunkList) {
View Full Code Here

        List<Object[]> list = query.getResultList();
        for (Object[] line: list) {
            DloClientUnique dcu = new DloClientUnique();
            Integer clientID = (Integer) line[0];
            Surname surname = (Surname) line[1];
            Name name = (Name) line[2];
            Patronymic pathronymic = (Patronymic) line[3];

            dcu.surnameID = surname == null ? 0 : surname.getId();
            dcu.nameID = name == null ? 0 : name.getId();
            dcu.pathronID = pathronymic == null ? 0 : pathronymic.getId();
            dcu.dateBorn = (Date) line[4];
            dcu.snils = line[5] != null ? ((String) line[5]).trim() : "";
            clientMap.put(dcu, clientID);
        }

        for (FacilityClient fc : facClientList) {
            Surname surname = fc.getSurname();
            Name name = fc.getName();
            Patronymic patronymic = fc.getPathronymic();
            Date born = fc.getBorn();
            String snils = fc.getSnils();

            DloClientUnique dcu = new DloClientUnique();
            dcu.surnameID = surname == null ? 0 : surname.getId();
            dcu.nameID = name == null ? 0 : name.getId();
            dcu.pathronID = patronymic == null ? 0 : patronymic.getId();
            dcu.dateBorn = born;
            dcu.snils = snils != null ? snils.trim() : "";

            Integer id = clientMap.get(dcu);
            if (id != null) {
                Client client = findEntity(Client.class, id);

                PersonalData data = new PersonalData();
                data.id = id;
                data.snils = snils;

                Polis polisOMI = ClientBean.findPolisOMI(client, manager);
                if (polisOMI != null) {
                    clientPolisMap.put(client.getId(), polisOMI);

                    String polisSN ="";
                    if (polisOMI.getSeries() != null) {
                        polisSN = polisOMI.getSeries();
                    }
                    if (polisOMI.getNumber() != null) {
                        polisSN = polisSN + " " + polisOMI.getNumber();
                    }
                    data.polisSN = polisSN.trim();

                    String code = polisOMI.getRegionCode().getTitle();
                    code += "00000000000000000";
                    Field[] f = new Field[]{new Field("kladrCode", code)};
                    List<AddressObject> adrs = findEntityList(AddressObject.class, f);
                    if (!adrs.isEmpty()) {
                        String okatoS = Long.toString(adrs.get(0).getOkato());
                        if (okatoS.length() > 5) {
                            okatoS = okatoS.substring(0, 5);
                        }
                        int okatoI = Integer.parseInt(okatoS);
                        data.okatoOMC = okatoI;
                    }
                    else {
                        data.okatoOMC = Integer.MIN_VALUE;
                    }

                    //TODO ОГРН СМО
                }

                data.surname = surname != null ? surname.getTitle() : null;
                data.name = name != null ? name.getTitle() : null;
                data.pathronymic = patronymic != null ? patronymic.getTitle() : null;

                Sex sex = client.getSex();
                if (sex != null) {
                    data.sex = client.getSex().getId() == Sex.CLIENT_SEX_MALE ? 'М' : 'Ж';
View Full Code Here

    private String generateTitle() {
        if (getClient() == null) {
            return "ФИО не указано";
        }
        Surname surname = getClient().getSurname();
        Name name = getClient().getName();
        Patronymic pat = getClient().getPathronymic();

        String collaborator = (surname == null) ? "?????????" : surname.getTitle();
        collaborator += " ";
        collaborator += (name == null) ? "?." : name.getTitle().substring(0, 1);
        collaborator += (pat == null) ? "?." : pat.getTitle().substring(0, 1);
        return collaborator;
    }
View Full Code Here

TOP

Related Classes of framework.beans.directory.simple.entities.Name

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.