Package com.inspiresoftware.lib.dto.geda.benchmark.domain

Examples of com.inspiresoftware.lib.dto.geda.benchmark.domain.Address


        if (person.getName() != null) {
            dto.setFirstName(person.getName().getFirstname());
            dto.setLastName(person.getName().getSurname());
        }
        if (person.getCurrentAddress() != null) {
            final Address address = person.getCurrentAddress();
            final AddressDTO addressDTO = fromAddress(address);
            dto.setCurrentAddress(addressDTO);
        }
        dto.setId(person.getId());
        return dto;
View Full Code Here


        person.setName(new Name(personDTO.getFirstName(), personDTO.getLastName()));

        if (personDTO.getCurrentAddress() != null) {
            final AddressDTO addressDTO = personDTO.getCurrentAddress();
            final Address address = fromAddressDTO(addressDTO);

            person.setCurrentAddress(address);
        }
        person.setPreviousAddresses(new ArrayList<Address>());
        for (final AddressDTO addressDTO : personDTO.getPreviousAddresses()) {
View Full Code Here

        person.setId(personDTO.getId());
        return person;
    }

    private Address fromAddressDTO(final AddressDTO addressDTO) {
        final Address address = new Address();

        address.setAddressLine1(addressDTO.getAddressLine1());
        address.setAddressLine2(addressDTO.getAddressLine2());
        address.setCity(addressDTO.getCity());
        address.setPostCode(addressDTO.getPostCode());
        address.setCountry(new Country(addressDTO.getCountryName()));
        return address;
    }
View Full Code Here

        if (person.getName() != null) {
            dto.setFirstName(person.getName().getFirstname());
            dto.setLastName(person.getName().getSurname());
        }
        if (person.getCurrentAddress() != null) {
            final Address address = person.getCurrentAddress();
            final AddressDTO addressDTO = fromAddress(address);
            dto.setCurrentAddress(addressDTO);
        }
        return dto;
    }
View Full Code Here

        person.setId(personDTO.getId());
        person.setName(new Name(personDTO.getFirstName(), personDTO.getLastName()));

        if (personDTO.getCurrentAddress() != null) {
            final AddressDTO addressDTO = personDTO.getCurrentAddress();
            final Address address = fromAddressDTO(addressDTO);

            person.setCurrentAddress(address);
        }
        return person;
    }
View Full Code Here

        }
        return person;
    }

    private Address fromAddressDTO(final AddressDTO addressDTO) {
        final Address address = new Address();

        address.setAddressLine1(addressDTO.getAddressLine1());
        address.setAddressLine2(addressDTO.getAddressLine2());
        address.setCity(addressDTO.getCity());
        address.setPostCode(addressDTO.getPostCode());
        address.setCountry(new Country(addressDTO.getCountryName()));
        return address;
    }
View Full Code Here

    @Override
    protected void setUp() throws Exception {

        final Name name = new Name("Sherlock", "Holmes");
        final Country country = new Country("United Kingdom");
        final Address address = new Address("221B Baker Street", null, "London", country, "NW1 6XE");
        final Person entity = new Person(1234567890123L, name, address);

        personLoaded = entity;

        final PersonDTO dto = new PersonDTO();
View Full Code Here

    public static Person providePersonEntity(final boolean withHistory) {

        final Name name = new Name("Sherlock", "Holmes");
        final Country country = new Country("United Kingdom");
        final Address home = new Address("221B Baker Street", null, "London", country, "NW1 6XE");
        final Person entity = new Person(123456789012L, name, home);

        if (withHistory) {
            final Address baskervilleHall = new Address("Baskerville Hall", null, "Hay-on-Wye", country, "HR3 5LE");
            entity.setPreviousAddresses(new ArrayList<Address>(Arrays.asList(home, baskervilleHall)));
        }

        return entity;
View Full Code Here

TOP

Related Classes of com.inspiresoftware.lib.dto.geda.benchmark.domain.Address

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.