42 Dao dao =
new DossierPU();
43 Set<EntityEdge>
set =
new HashSet<>();
44 set.addAll(SqlClause.select(
"cp").from(
"CategoryParticipant cp")
46 .resultList(CategoryParticipant.class)
48 .map(cp ->
new EntityEdge(
49 convert(
"contact", cp.getIContact()),
50 convert(
"dossier-category", cp.getCategory().getId(), cp.getCategory().getDescription())))
51 .collect(Collectors.toSet()));
52 set.addAll(SqlClause.select(
"p").from(
"Participant p")
54 .resultList(Participant.class)
56 .map(cp ->
new EntityEdge(
57 convert(
"contact", cp.getIContact()),
58 convert(
"dossier", cp.getDossier().getId(), cp.getDossier().getDescription())))
59 .collect(Collectors.toSet()));
60 set.addAll(SqlClause.select(
"c").from(
"Category c")
61 .where().isNotNull(
"c.parent")
63 .resultList(Category.class)
65 .map(c ->
new EntityEdge(
66 convert(
"dossier-category", c.getId(), c.getDescription()),
67 convert(
"dossier-category", c.getParent().getId(), c.getParent().getDescription())))
68 .collect(Collectors.toSet()));
69 set.addAll(SqlClause.select(
"d").from(
"Dossier d")
71 .resultList(Dossier.class)
73 .map(d ->
new EntityEdge(
74 convert(
"dossier", d.getId(), d.getDescription()),
75 convert(
"dossier-category", d.getCategory().getId(), d.getCategory().getDescription())))
76 .collect(Collectors.toSet()));
default EntityVertex convert(String root, String id, String name)