Package org.jtalks.jcommune.service.dto

Examples of org.jtalks.jcommune.service.dto.UserContactContainer


        List<UserContactContainer> contacts = new ArrayList<>();
        if (dto == null) {
            return contacts;
        }
        for (UserContactDto contact : dto.getContacts()) {
            contacts.add(new UserContactContainer(contact.getId(),
                    contact.getValue(), contact.getType().getId()));
        }
        return contacts;
    }
View Full Code Here


        long contactTypeId1 = 1;
        long contactTypeId2 = 2;
        String newValue2 = "new value 2";

        List<UserContactContainer> contacts = new ArrayList<>(addContactsToUser(user, 1, contactTypeId1));
        UserContactContainer contact1 = contacts.get(0);
        contact1.setTypeId(contactTypeId2);
        contact1.setValue(newValue2);

        prepareContactsMocks();
        UserContactType contactType = createUserContactType(contactTypeId2);
        when(userContactsDao.get(contactType.getId())).thenReturn(contactType);
        when(userContactsDao.isExist(anyLong())).thenReturn(true);
View Full Code Here

        List<UserContactContainer> contacts = new ArrayList<>();
        for (int i = 0; i < contactsCount; i++) {
            UserContact contact = new UserContact("contact" + i, createUserContactType(contactTypeId));
            contact.setId(user.getContacts().size() + 1);
            user.addContact(contact);
            contacts.add(new UserContactContainer(contact.getId(), contact.getValue(), contact.getType().getId()));
        }
        return contacts;
    }
View Full Code Here

    }

    private static List<UserContactContainer> getContacts(Set<UserContact> userContacts) {
        List<UserContactContainer> contacts = new ArrayList<>();
        for (UserContact contact : userContacts) {
            contacts.add(new UserContactContainer(contact.getId(), contact.getValue(), contact.getType().getId()));
        }
        return contacts;
    }
View Full Code Here

    }

    private static List<UserContactContainer> createNewContacts(long newContactsSize, long contactTypeId) {
        List<UserContactContainer> contacts = new ArrayList<>();
        for (long i = 0; i < newContactsSize; i++) {
            contacts.add(new UserContactContainer(null, "contact" + (contacts.size() + 1), contactTypeId));
        }
        return contacts;
    }
View Full Code Here

TOP

Related Classes of org.jtalks.jcommune.service.dto.UserContactContainer

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.