Package org.company.recordshop.service.dto

Examples of org.company.recordshop.service.dto.ArtistDto


  public List<ArtistDto> listAllArtists() {
    List<Artist> all = customerServiceModelDomainService.listAllArtists();
    List<ArtistDto> result = new ArrayList<ArtistDto>();

    for (Artist object : all) {
      ArtistDto item = artistDtoTranslator.toDto(object);
      result.add(item);
    }
    return result;
  }
View Full Code Here


    List<Artist> range = customerServiceModelDomainService.listArtists(
        firstResult, maxResults);
    List<ArtistDto> result = new ArrayList<ArtistDto>();

    for (Artist object : range) {
      ArtistDto item = artistDtoTranslator.toDto(object);
      result.add(item);
    }
    return result;
  }
View Full Code Here

    List<Artist> range = customerServiceModelDomainService.listArtists(
        firstResult, maxResults, sortProperty, isAscending);
    List<ArtistDto> result = new ArrayList<ArtistDto>();

    for (Artist object : range) {
      ArtistDto item = artistDtoTranslator.toDto(object);
      result.add(item);
    }
    return result;
  }
View Full Code Here

  ArtistDto toDto(final Artist source, final Map<Object, Object> translated) {
    if (translated.containsKey((source))) {
      return (ArtistDto) translated.get(source);
    }
    Assert.notNull(source, "argument [source] may not be null");
    ArtistDto result = new ArtistDto(source.getId(), source.getVersion());
    result.setFirstName(source.getFirstName());
    result.setLastName(source.getLastName());
    result.setAge(source.getAge());
    result.setArtistName(source.getArtistName());

    translated.put(source, result);

    return result;
  }
View Full Code Here

  @Autowired
  protected ArtistDtoTranslator translator = new ArtistDtoTranslator();

  @Test
  public void testFromDtoArtistDto() {
    ArtistDto source = new ArtistDto();
    try {
      translator.fromDto(source);
      fail("Expected IllegalArgumentException");
    } catch (IllegalArgumentException e) {
      assertEquals(
View Full Code Here

TOP

Related Classes of org.company.recordshop.service.dto.ArtistDto

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.