Search in sources :

Example 11 with Artist

use of org.mapstruct.ap.test.constructor.nestedsource.source.Artist in project mapstruct by mapstruct.

the class ChartEntryToArtistImpl method chartSongArtistLabelStudioCity.

private String chartSongArtistLabelStudioCity(Chart chart) {
    if (chart == null) {
        return null;
    }
    Song song = chart.getSong();
    if (song == null) {
        return null;
    }
    Artist artist = song.getArtist();
    if (artist == null) {
        return null;
    }
    Label label = artist.getLabel();
    if (label == null) {
        return null;
    }
    Studio studio = label.getStudio();
    if (studio == null) {
        return null;
    }
    String city = studio.getCity();
    if (city == null) {
        return null;
    }
    return city;
}
Also used : Artist(org.mapstruct.ap.test.constructor.nestedsource.source.Artist) Song(org.mapstruct.ap.test.constructor.nestedsource.source.Song) Label(org.mapstruct.ap.test.constructor.nestedsource.source.Label) Studio(org.mapstruct.ap.test.constructor.nestedsource.source.Studio)

Aggregations

Artist (org.mapstruct.ap.test.constructor.nestedsource.source.Artist)11 Label (org.mapstruct.ap.test.constructor.nestedsource.source.Label)8 Song (org.mapstruct.ap.test.constructor.nestedsource.source.Song)7 Studio (org.mapstruct.ap.test.constructor.nestedsource.source.Studio)7 ChartEntry (org.mapstruct.ap.test.constructor.nestedsource._target.ChartEntry)2 ProcessorTest (org.mapstruct.ap.testutil.ProcessorTest)2 WithClasses (org.mapstruct.ap.testutil.WithClasses)2 ChartEntryLabel (org.mapstruct.ap.test.constructor.nestedsource._target.ChartEntryLabel)1 Chart (org.mapstruct.ap.test.constructor.nestedsource.source.Chart)1