use of org.mapstruct.ap.test.constructor.nestedsource._target.ChartEntry in project mapstruct by mapstruct.
the class ArtistToChartEntryImpl method map.
@Override
public ChartEntry map(Chart name) {
if (name == null) {
return null;
}
ChartEntry chartEntry = new ChartEntry();
chartEntry.setChartName(name.getName());
return chartEntry;
}
use of org.mapstruct.ap.test.constructor.nestedsource._target.ChartEntry in project mapstruct by mapstruct.
the class ArtistToChartEntryImpl method map.
@Override
public ChartEntry map(Chart chart, Song song, Integer position) {
if (chart == null && song == null && position == null) {
return null;
}
ChartEntry chartEntry = new ChartEntry();
if (chart != null) {
chartEntry.setChartName(chart.getName());
}
if (song != null) {
chartEntry.setSongTitle(song.getTitle());
chartEntry.setArtistName(songArtistName(song));
chartEntry.setRecordedAt(songArtistLabelStudioName(song));
chartEntry.setCity(songArtistLabelStudioCity(song));
}
if (position != null) {
chartEntry.setPosition(position);
}
return chartEntry;
}
use of org.mapstruct.ap.test.constructor.nestedsource._target.ChartEntry in project mapstruct by mapstruct.
the class ArtistToChartEntryImpl method map.
@Override
public ChartEntry map(Song song) {
if (song == null) {
return null;
}
ChartEntry chartEntry = new ChartEntry();
chartEntry.setSongTitle(song.getTitle());
chartEntry.setArtistName(songArtistName(song));
chartEntry.setRecordedAt(songArtistLabelStudioName(song));
chartEntry.setCity(songArtistLabelStudioCity(song));
return chartEntry;
}
use of org.mapstruct.ap.test.constructor.nestedsource._target.ChartEntry in project mapstruct by mapstruct.
the class ChartEntryToArtistImpl method map.
@Override
public ChartEntry map(Chart chart) {
if (chart == null) {
return null;
}
ChartEntry chartEntry = new ChartEntry();
chartEntry.setChartName(chart.getName());
chartEntry.setSongTitle(chartSongTitle(chart));
chartEntry.setArtistName(chartSongArtistName(chart));
chartEntry.setRecordedAt(chartSongArtistLabelStudioName(chart));
chartEntry.setCity(chartSongArtistLabelStudioCity(chart));
chartEntry.setPosition(mapPosition(chartSongPositions(chart)));
return chartEntry;
}
use of org.mapstruct.ap.test.constructor.nestedsource._target.ChartEntry in project mapstruct by mapstruct.
the class ChartEntryToArtistImpl method map.
@Override
public ChartEntry map(Chart chart) {
if (chart == null) {
return null;
}
String chartName = null;
String songTitle = null;
String artistName = null;
String recordedAt = null;
String city = null;
int position = 0;
chartName = chart.getName();
songTitle = chartSongTitle(chart);
artistName = chartSongArtistName(chart);
recordedAt = chartSongArtistLabelStudioName(chart);
city = chartSongArtistLabelStudioCity(chart);
position = mapPosition(chartSongPositions(chart));
ChartEntry chartEntry = new ChartEntry(chartName, songTitle, artistName, recordedAt, city, position);
return chartEntry;
}
Aggregations