19 package org.turro.entitites.graph;
21 import java.util.HashSet;
23 import java.util.stream.Collectors;
24 import org.turro.dossier.db.DossierPU;
25 import org.turro.dossier.entity.Category;
26 import org.turro.dossier.entity.CategoryParticipant;
27 import org.turro.dossier.entity.Dossier;
28 import org.turro.dossier.entity.Participant;
29 import org.turro.entities.graph.EntityEdge;
30 import org.turro.entities.graph.IVertexProvider;
31 import org.turro.jpa.Dao;
32 import org.turro.sql.SqlClause;
43 Set<EntityEdge>
set =
new HashSet<>();
44 set.addAll(SqlClause.select(
"cp").from(
"CategoryParticipant cp")
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")
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")
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")
74 convert(
"dossier", d.getId(), d.getDescription()),
75 convert(
"dossier-category", d.getCategory().getId(), d.getCategory().getDescription())))
76 .collect(Collectors.toSet()));
Set< EntityEdge > getEdges()
default EntityVertex convert(String root, String id, String name)