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<NoeudSlimResponse> getNoeudsEnvoi() {
|
return routage
|
.getNoeudsEnvoi()
|
.stream()
|
.map(r -> new NoeudSlimResponse(r))
|
.collect(Collectors.toSet());
|
}
|
|
public Set<GroupeNoeudSlimResponse> getGroupeNoeudsEnvoi() {
|
return routage
|
.getGroupeNoeudsEnvoi()
|
.stream()
|
.map(g -> new GroupeNoeudSlimResponse(g))
|
.collect(Collectors.toSet());
|
}
|
|
public Set<ParticipantSlimResponse> getParticipantsEnvoi() {
|
return routage
|
.getParticipantsEnvoi()
|
.stream()
|
.map(p -> new ParticipantSlimResponse(p))
|
.collect(Collectors.toSet());
|
}
|
|
public Set<GroupeParticipantSlimResponse> getGroupeParticipantsEnvoi() {
|
return routage
|
.getGroupeParticipantsEnvoi()
|
.stream()
|
.map(g -> new GroupeParticipantSlimResponse(g))
|
.collect(Collectors.toSet());
|
}
|
|
public Set<NoeudSlimResponse> getNoeudsReception() {
|
return routage
|
.getNoeudsReception()
|
.stream()
|
.map(r -> new NoeudSlimResponse(r))
|
.collect(Collectors.toSet());
|
}
|
|
public Set<GroupeNoeudSlimResponse> getGroupeNoeudsReception() {
|
return routage
|
.getGroupeNoeudsReception()
|
.stream()
|
.map(g -> new GroupeNoeudSlimResponse(g))
|
.collect(Collectors.toSet());
|
}
|
|
public Set<ParticipantSlimResponse> getParticipantsReception() {
|
return routage
|
.getParticipantsReception()
|
.stream()
|
.map(p -> new ParticipantSlimResponse(p))
|
.collect(Collectors.toSet());
|
}
|
|
public Set<GroupeParticipantSlimResponse> getGroupeParticipantsReception() {
|
return routage
|
.getGroupeParticipantsReception()
|
.stream()
|
.map(g -> new GroupeParticipantSlimResponse(g))
|
.collect(Collectors.toSet());
|
}
|
|
}
|