BrightSide Workbench Full Report + Source Code
org.turro.entitites.graph.DossierVertexProvider Class Reference
Inheritance diagram for org.turro.entitites.graph.DossierVertexProvider:
Collaboration diagram for org.turro.entitites.graph.DossierVertexProvider:

Public Member Functions

Set< EntityEdgegetEdges ()
 
- Public Member Functions inherited from org.turro.entities.graph.IVertexProvider
default EntityVertex convert (String root, String id, String name)
 
default EntityVertex convert (String root, Long id, String name)
 
default EntityVertex convert (String root, IContact contact)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 38 of file DossierVertexProvider.java.

Member Function Documentation

◆ getEdges()

Set<EntityEdge> org.turro.entitites.graph.DossierVertexProvider.getEdges ( )

Implements org.turro.entities.graph.IVertexProvider.

Definition at line 41 of file DossierVertexProvider.java.

41  {
42  Dao dao = new DossierPU();
43  Set<EntityEdge> set = new HashSet<>();
44  set.addAll(SqlClause.select("cp").from("CategoryParticipant cp")
45  .dao(dao)
46  .resultList(CategoryParticipant.class)
47  .stream()
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")
53  .dao(dao)
54  .resultList(Participant.class)
55  .stream()
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")
62  .dao(dao)
63  .resultList(Category.class)
64  .stream()
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")
70  .dao(dao)
71  .resultList(Dossier.class)
72  .stream()
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()));
77 // set.addAll(SqlClause.select("ip").from("IssueParticipant ip")
78 // .dao(dao)
79 // .resultList(IssueParticipant.class)
80 // .stream()
81 // .map(cp -> new EntityEdge(
82 // convert("contact", cp.getIContact()),
83 // convert("issue", cp.getIssue().getId(), cp.getIssue().getDescription())))
84 // .collect(Collectors.toSet()));
85 // set.addAll(SqlClause.select("i").from("Issue i")
86 // .dao(dao)
87 // .resultList(Issue.class)
88 // .stream()
89 // .map(i -> new EntityEdge(
90 // convert("issue", i.getId(), i.getDescription()),
91 // convert("dossier", i.getDossier().getId(), i.getDossier().getDescription())))
92 // .collect(Collectors.toSet()));
93  return set;
94  }
default EntityVertex convert(String root, String id, String name)
Here is the call graph for this function:

The documentation for this class was generated from the following file: