Examples of ArtistDTO


Examples of de.fhdw.ify208.ticketmaster.common.model.ArtistDTO

  }

  @Test
  public void createArtist() {
    BaseDTO result = new BaseDTO();
    ArtistDTO artist = new ArtistDTO();
    TypeCodeDTO tpCode = new TypeCodeDTO();
    tpCode.setId(1);
    tpCode.setDescription("Test");
    artist.setid(new Long(4));
    artist.setStageName("Test4");
    artist.setFirstName("First");
    artist.setLastName("Last");
    artist.setMessage("Test");
    artist.setGenre(tpCode);
    artist.setMessage("Test");
    result = _theEventManager.registerNewArtist(artist);
    Assert.assertTrue("New Artist:",result.getReturncode() == 0);
   
    artist.setid(new Long(2));
    artist.setStageName("Test");
    artist.setFirstName("First");
    artist.setLastName("Last");
    artist.setMessage("Test");
    artist.setGenre(tpCode);
    artist.setMessage("Test");
    result = _theEventManager.registerNewArtist(artist);
    Assert.assertTrue("New Artist not registered:",result.getReturncode() != 0)
  }
View Full Code Here

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

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

    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

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

    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

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

  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

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

  @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
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.