Examples of PersonDTO


Examples of com.inspiresoftware.lib.dto.geda.benchmark.dto.PersonDTO

    @Test
    public void testCollectionsMapper() throws Exception {

        final Person entity = getEntityWithHistory();
        final PersonDTO dto = getDtoWithHistory();

        final Mapper mapper = new GeDAListMapper();

        assertEquals(entity, mapper.fromDto(dto));
        assertEquals(dto, mapper.fromEntity(entity));
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.benchmark.dto.PersonDTO

    @Test
    public void testMapMapper() throws Exception {

        final Person entity = getEntityWithHistory();
        final PersonDTO dto = getDtoWithHistoryByCity();

        final Mapper mapper = new GeDABasicMapper();

        assertEquals(entity, mapper.fromDto(dto));
        assertEquals(dto, mapper.fromEntity(entity));
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.benchmark.dto.PersonDTO

    }

    public static PersonDTO providePersonDTO(final boolean withHistory, final boolean historyByCity) {

        final PersonDTO dto;
        if (withHistory) {
            if (historyByCity) {
                dto = new PersonWithHistoryByCityDTO();
            } else {
                dto = new PersonWithHistoryDTO();
            }
        } else {
            dto = new PersonDTO();
        }

        dto.setId(1234567890123L);
        dto.setFirstName("Sherlock");
        dto.setLastName("Holmes");

        final AddressDTO addressDTO = new AddressDTO();
        addressDTO.setAddressLine1("221B Baker Street");
        addressDTO.setCity("London");
        addressDTO.setPostCode("NW1 6XE");
        addressDTO.setCountryName("United Kingdom");
        dto.setCurrentAddress(addressDTO);

        if (withHistory) {
            final AddressDTO addressPrevDTO = new AddressDTO();
            addressPrevDTO.setAddressLine1("Baskerville Hall");
            addressPrevDTO.setCity("Hay-on-Wye");
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.benchmark.dto.PersonDTO

    @Test
    public void testMapper() throws Exception {

        final Person entity = getEntity();
        final PersonDTO dto = getDto();

        final Mapper mapper = new OrikaBasicMapper();

        assertEquals(entity, mapper.fromDto(dto));
        assertEquals(dto, mapper.fromEntity(entity));
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.benchmark.dto.PersonDTO

    @Test
    public void testMapper() throws Exception {

        final Person entity = getEntityWithHistory();
        final PersonDTO dto = getDtoWithHistory();

        final Mapper mapper = new OrikaListMapper();


        final Person fromDto = (Person) mapper.fromDto(dto);
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.benchmark.dto.PersonDTO

    public GeDAListMapper() {
        asm = DTOAssembler.newAssembler(PersonWithHistoryDTO.class, Person.class, this.getClass().getClassLoader());
    }

    public Object fromEntity(final Object entity) {
        final PersonDTO person = new PersonWithHistoryDTO();
        asm.assembleDto(person, entity, null, bf);
        return person;
    }
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.benchmark.dto.PersonDTO

    public GeDABasicMapper(final String synthesizer) {
        this.asm = DTOAssembler.newCustomAssembler(PersonDTO.class, Person.class, this.getClass().getClassLoader(), synthesizer);
    }

    public Object fromEntity(final Object entity) {
        final PersonDTO person = new PersonDTO();
        asm.assembleDto(person, entity, null, bf);
        return person;
    }
View Full Code Here

Examples of com.zerodes.exchangesync.dto.PersonDto

    if (event.getEnd().getDateTime() != null) {
      result.setAllDay(event.getEnd().getDateTime().isDateOnly());
    }
    result.setLocation(event.getLocation());
    if (event.getOrganizer() != null) {
      final PersonDto person = new PersonDto();
      person.setName(event.getOrganizer().getDisplayName());
      person.setEmail(event.getOrganizer().getEmail());
      result.setOrganizer(person);
    }
    if (event.getAttendees() != null) {
      final Set<PersonDto> attendees = new HashSet<PersonDto>();
      for (final EventAttendee eventAttendee : event.getAttendees()) {
        final PersonDto person = new PersonDto();
        person.setName(eventAttendee.getDisplayName());
        person.setEmail(eventAttendee.getEmail());
        if (eventAttendee.getOptional() != null) {
          person.setOptional(eventAttendee.getOptional());
        }
        attendees.add(person);
      }
      result.setAttendees(attendees);
    }
View Full Code Here

Examples of com.zerodes.exchangesync.dto.PersonDto

    task.setDueDate(convertToJodaDateTime(dueDate, false));
    return task;
  }
 
  public PersonDto convertToPersonDto(final EmailAddress email, final boolean optional) {
    final PersonDto person = new PersonDto();
    person.setName(email.getName());
    if (email.getRoutingType().equals("SMTP")) {
      person.setEmail(email.getAddress());
    }
    person.setOptional(optional);
    return person;
  }
View Full Code Here

Examples of net.petrikainulainen.spring.datajpa.dto.PersonDTO

     */
    @RequestMapping(value = "/person/create", method = RequestMethod.GET)
    public String showCreatePersonForm(Model model) {
        LOGGER.debug("Rendering create person form");
       
        model.addAttribute(MODEL_ATTIRUTE_PERSON, new PersonDTO());

        return PERSON_ADD_FORM_VIEW;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.