Check style found code duplication in factory I have some methods in my mapper:

public EventDto mapToDto(Event googleEvent, EventDto baseEventDto) {
    EventDto eventDto = mapToDto(googleEvent, baseEventDto.getOriginalCalendarId());
    eventDto.setCalendarId(baseEventDto.getCalendarId());
    eventDto.setCollectiveId(baseEventDto.getCollectiveId());
    eventDto.setId(baseEventDto.getId());
    return eventDto;
}


and 

public EventDto mapToDto(Event googleEvent, String originalCalendarId) {
    ///...
}


difference is in few rows here because of different clients. Right now, my mapper should be improved with abstraction and another child. To use improved mappers I need a factory that contains:

@Autowired
private GoogleEventDtoMapperConfirmed googleEventDtoMapperConfirmed;
@Autowired
private GoogleEventDtoMapperCanceled googleEventDtoMapperCanceled;

public EventDto mapToDto(Event googleEvent, EventDto baseEventDto) {
    switch (googleEvent.getStatus()) {
        case GoogleEventStatus.CANCELLED:
            return googleEventDtoMapperCanceled.mapToDto(googleEvent, baseEventDto);
        case GoogleEventStatus.CONFIRMED:
        case GoogleEventStatus.TENTATIVE:
        default:
            return googleEventDtoMapperConfirmed.mapToDto(googleEvent, baseEventDto);
    }
}

public EventDto mapToDto(Event googleEvent, String originalCalendarId) {
    switch (googleEvent.getStatus()) {
        case GoogleEventStatus.CANCELLED:
            return googleEventDtoMapperCanceled.mapToDto(googleEvent, originalCalendarId);
        case GoogleEventStatus.CONFIRMED:
        case GoogleEventStatus.TENTATIVE:
        default:
            return googleEventDtoMapperConfirmed.mapToDto(googleEvent, originalCalendarId);
    }
}


I believe factory is a good choice, but as you see here, there is some duplication that should be reduced. I can't move part mapper logic to the factory because of semantical reason (if I move duplication part will be fixed), and on the other hand, I have sonar duplicate issues.



Any ideas on how to reduce duplication part? Or, if you think some mapper part can be moved into the factory, please explain concepts why mapper rules should be moved into the factory part.
I've just got idea how solution should be implemented. It seems stayed clear for me when question was published (this implementation is not best, but idea is pretty good for me). My abstract factory should be replaced with strategy pattern who returns builder that I need.

public EventDto mapToDto(Event googleEvent, EventDto baseEventDto) {
    return getStrategy(googleEvent.getStatus()).mapToDto(googleEvent, baseEventDto);
}

public EventDto mapToDto(Event googleEvent, String originalCalendarId) {
    return getStrategy(googleEvent.getStatus()).mapToDto(googleEvent, originalCalendarId);
}

public GoogleEventDtoMapperAbstract getMappingStrategy(String status) {
    switch (status) {
        case GoogleEventStatus.CANCELLED:
            return googleEventDtoMapperCanceled;
        case GoogleEventStatus.CONFIRMED:
            // will be implemented by needs
        case GoogleEventStatus.TENTATIVE:
            // will be implemented by needs
        default:
            return googleEventDtoMapperConfirmed;
    }
}