Search in sources :

Example 21 with ChartEntry

use of org.mapstruct.ap.test.nestedsourceproperties._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;
}
Also used : ChartEntry(org.mapstruct.ap.test.nestedsourceproperties._target.ChartEntry)

Example 22 with ChartEntry

use of org.mapstruct.ap.test.nestedsourceproperties._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;
}
Also used : ChartEntry(org.mapstruct.ap.test.nestedsourceproperties._target.ChartEntry)

Example 23 with ChartEntry

use of org.mapstruct.ap.test.nestedsourceproperties._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;
}
Also used : ChartEntry(org.mapstruct.ap.test.constructor.nestedsource._target.ChartEntry)

Example 24 with ChartEntry

use of org.mapstruct.ap.test.nestedsourceproperties._target.ChartEntry in project mapstruct by mapstruct.

the class ArtistToChartEntryImpl method map.

@Override
public ChartEntry map(Chart name) {
    if (name == null) {
        return null;
    }
    String chartName = null;
    chartName = name.getName();
    String songTitle = null;
    String artistName = null;
    String recordedAt = null;
    String city = null;
    int position = 0;
    ChartEntry chartEntry = new ChartEntry(chartName, songTitle, artistName, recordedAt, city, position);
    return chartEntry;
}
Also used : ChartEntry(org.mapstruct.ap.test.constructor.nestedsource._target.ChartEntry)

Example 25 with ChartEntry

use of org.mapstruct.ap.test.nestedsourceproperties._target.ChartEntry in project mapstruct by mapstruct.

the class ArtistToChartEntryImpl method map.

@Override
public ChartEntry map(Song song) {
    if (song == null) {
        return null;
    }
    String songTitle = null;
    String artistName = null;
    String recordedAt = null;
    String city = null;
    songTitle = song.getTitle();
    artistName = songArtistName(song);
    recordedAt = songArtistLabelStudioName(song);
    city = songArtistLabelStudioCity(song);
    String chartName = null;
    int position = 0;
    ChartEntry chartEntry = new ChartEntry(chartName, songTitle, artistName, recordedAt, city, position);
    return chartEntry;
}
Also used : ChartEntry(org.mapstruct.ap.test.constructor.nestedsource._target.ChartEntry)

Aggregations

ProcessorTest (org.mapstruct.ap.testutil.ProcessorTest)22 ChartEntry (org.mapstruct.ap.test.nestedsourceproperties._target.ChartEntry)19 WithClasses (org.mapstruct.ap.testutil.WithClasses)16 ChartEntry (org.mapstruct.ap.test.constructor.nestedsource._target.ChartEntry)12 Song (org.mapstruct.ap.test.nestedsourceproperties.source.Song)11 Chart (org.mapstruct.ap.test.nestedsourceproperties.source.Chart)10 Song (org.mapstruct.ap.test.constructor.nestedsource.source.Song)5 Test (org.junit.Test)4 Chart (org.mapstruct.ap.test.constructor.nestedsource.source.Chart)4 BaseChartEntry (org.mapstruct.ap.test.nestedsourceproperties._target.BaseChartEntry)4 BaseChartEntry (org.mapstruct.ap.test.constructor.nestedsource._target.BaseChartEntry)3 Artist (org.mapstruct.ap.test.constructor.nestedsource.source.Artist)2 Label (org.mapstruct.ap.test.constructor.nestedsource.source.Label)2 Studio (org.mapstruct.ap.test.constructor.nestedsource.source.Studio)2 Artist (org.mapstruct.ap.test.nestedsourceproperties.source.Artist)2 Label (org.mapstruct.ap.test.nestedsourceproperties.source.Label)2 Studio (org.mapstruct.ap.test.nestedsourceproperties.source.Studio)2 ChartEntryComposed (org.mapstruct.ap.test.nestedsourceproperties._target.ChartEntryComposed)1 ChartEntryWithBase (org.mapstruct.ap.test.nestedsourceproperties._target.ChartEntryWithBase)1 ChartEntryWithMapping (org.mapstruct.ap.test.nestedsourceproperties._target.ChartEntryWithMapping)1