package com.megatim.fdxconsultation.model.referentiel.dtos; import com.megatim.fdxcommons.model.referentiel.Routage; import java.util.Set; import java.util.stream.Collectors; /** * * @author Gabuntu */ public class RoutageDetailsResponse extends RoutageSlimResponse { public RoutageDetailsResponse(Routage routage) { super(routage); } public Set getNoeudsEnvoi() { return routage .getNoeudsEnvoi() .stream() .map(r -> new NoeudSlimResponse(r)) .collect(Collectors.toSet()); } public Set getGroupeNoeudsEnvoi() { return routage .getGroupeNoeudsEnvoi() .stream() .map(g -> new GroupeNoeudSlimResponse(g)) .collect(Collectors.toSet()); } public Set getParticipantsEnvoi() { return routage .getParticipantsEnvoi() .stream() .map(p -> new ParticipantSlimResponse(p)) .collect(Collectors.toSet()); } public Set getGroupeParticipantsEnvoi() { return routage .getGroupeParticipantsEnvoi() .stream() .map(g -> new GroupeParticipantSlimResponse(g)) .collect(Collectors.toSet()); } public Set getNoeudsReception() { return routage .getNoeudsReception() .stream() .map(r -> new NoeudSlimResponse(r)) .collect(Collectors.toSet()); } public Set getGroupeNoeudsReception() { return routage .getGroupeNoeudsReception() .stream() .map(g -> new GroupeNoeudSlimResponse(g)) .collect(Collectors.toSet()); } public Set getParticipantsReception() { return routage .getParticipantsReception() .stream() .map(p -> new ParticipantSlimResponse(p)) .collect(Collectors.toSet()); } public Set getGroupeParticipantsReception() { return routage .getGroupeParticipantsReception() .stream() .map(g -> new GroupeParticipantSlimResponse(g)) .collect(Collectors.toSet()); } }