use of org.mapstruct.ap.test.nestedsourceproperties.source.Song in project mapstruct by mapstruct.
the class ChartEntryToArtistImpl method chartSongPositions.
private List<Integer> chartSongPositions(Chart chart) {
if (chart == null) {
return null;
}
Song song = chart.getSong();
if (song == null) {
return null;
}
List<Integer> positions = song.getPositions();
if (positions == null) {
return null;
}
return positions;
}
use of org.mapstruct.ap.test.nestedsourceproperties.source.Song in project mapstruct by mapstruct.
the class ChartEntryToArtistImpl method map.
@Override
public Chart map(ChartEntry chartEntry1, ChartEntry chartEntry2) {
if (chartEntry1 == null && chartEntry2 == null) {
return null;
}
Chart chart = new Chart();
if (chartEntry1 != null) {
if (chart.getSong() == null) {
chart.setSong(new Song());
}
chartEntryToSong1(chartEntry1, chart.getSong());
}
if (chartEntry2 != null) {
if (chart.getSong() == null) {
chart.setSong(new Song());
}
chartEntryToSong2(chartEntry2, chart.getSong());
chart.setName(chartEntry2.getChartName());
}
return chart;
}
use of org.mapstruct.ap.test.nestedsourceproperties.source.Song in project mapstruct by mapstruct.
the class ChartEntryToArtistImpl method chartEntryToSong.
protected Song chartEntryToSong(ChartEntry chartEntry) {
if (chartEntry == null) {
return null;
}
Song song = new Song();
song.setArtist(chartEntryToArtist(chartEntry));
song.setTitle(chartEntry.getSongTitle());
song.setPositions(mapPosition(chartEntry.getPosition()));
return song;
}
use of org.mapstruct.ap.test.nestedsourceproperties.source.Song 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;
}
use of org.mapstruct.ap.test.nestedsourceproperties.source.Song in project mapstruct by mapstruct.
the class ChartEntryToArtistImpl method chartSongArtistLabelStudioName.
private String chartSongArtistLabelStudioName(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 name = studio.getName();
if (name == null) {
return null;
}
return name;
}
Aggregations