BrightSide Workbench Full Report + Source Code
org.turro.activity.DossierActivity Class Reference
Inheritance diagram for org.turro.activity.DossierActivity:
Collaboration diagram for org.turro.activity.DossierActivity:

Public Member Functions

void generate ()
 

Detailed Description

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

Definition at line 36 of file DossierActivity.java.

Member Function Documentation

◆ generate()

void org.turro.activity.DossierActivity.generate ( )

Implements org.turro.activity.IElephantActivity.

Definition at line 39 of file DossierActivity.java.

39  {
40  Activities staacts = Activities.of("Started");
41  SqlClause.select("project.dossier").from("Project project")
42  .where().greater("project.startDate", staacts.lastDate())
43  .dao(dao.get()).forEach(Dossier.class, dossier -> {
44  IElephantEntity idossier = Entities.getController(dossier);
45  if(!idossier.isEmpty()) {
46  staacts.add(dossier.getProject().getStartDate(), idossier.getPath(), idossier.getPath(), idossier.getHierarchicalPath());
47  }
48  });
49  Activities apracts = Activities.of("Approved");
50  SqlClause.select("project.dossier").from("Project project")
51  .where().greater("project.approvedDate", apracts.lastDate())
52  .dao(dao.get()).forEach(Dossier.class, dossier -> {
53  IElephantEntity idossier = Entities.getController(dossier);
54  if(!idossier.isEmpty()) {
55  apracts.add(dossier.getProject().getApprovedDate(), idossier.getPath(), idossier.getPath(), idossier.getHierarchicalPath());
56  }
57  });
58  Activities opoacts = Activities.of("End oppositing");
59  SqlClause.select("project.dossier").from("Project project")
60  .where().greater("project.oppositingEndDate", opoacts.lastDate())
61  .dao(dao.get()).forEach(Dossier.class, dossier -> {
62  IElephantEntity idossier = Entities.getController(dossier);
63  if(!idossier.isEmpty()) {
64  opoacts.add(dossier.getProject().getOppositingEndDate(), idossier.getPath(), idossier.getPath(), idossier.getHierarchicalPath());
65  }
66  });
67  Activities endacts = Activities.of("Ended");
68  SqlClause.select("project.dossier").from("Project project")
69  .where().greater("project.endDate", endacts.lastDate())
70  .dao(dao.get()).forEach(Dossier.class, dossier -> {
71  IElephantEntity idossier = Entities.getController(dossier);
72  if(!idossier.isEmpty()) {
73  endacts.add(dossier.getProject().getEndDate(), idossier.getPath(), idossier.getPath(), idossier.getHierarchicalPath());
74  }
75  });
76  Activities chaacts = Activities.of("Changed phase");
77  SqlClause.select("project.dossier").from("Project project")
78  .where().greater("project.changePhase", chaacts.lastDate())
79  .dao(dao.get()).forEach(Dossier.class, dossier -> {
80  IElephantEntity idossier = Entities.getController(dossier);
81  if(!idossier.isEmpty()) {
82  chaacts.add(dossier.getProject().getChangePhase(), idossier.getPath(), idossier.getPath(), idossier.getHierarchicalPath());
83  }
84  });
85  Activities creacts = Activities.of("Created");
86  SqlClause.select("dossier").from("Dossier dossier")
87  .where().greater("dossier.creation", creacts.lastDate())
88  .dao(dao.get()).forEach(Dossier.class, dossier -> {
89  IElephantEntity idossier = Entities.getController(dossier);
90  if(!idossier.isEmpty()) {
91  creacts.add(dossier.getCreation(), idossier.getPath(), idossier.getPath(), idossier.getHierarchicalPath());
92  }
93  });
94  Activities newacts = Activities.of("New participant");
95  SqlClause.select("par").from("Participant par")
96  .where().greater("par.creation", newacts.lastDate())
97  .dao(dao.get()).forEach(Participant.class, par -> {
98  IElephantEntity idossier = Entities.getController(par.getDossier());
99  if(!idossier.isEmpty()) {
100  String path = DossierPU.getObjectPath(par);
101  newacts.add(par.getCreation(), path, idossier.getPath(), idossier.getHierarchicalPath());
102  }
103  });
104  Activities icoacts = Activities.of("Informed");
105  SqlClause.select("icom").from("IssueComment icom")
106  .where().greater("icom.modification", icoacts.lastDate())
107  .dao(dao.get()).forEach(IssueComment.class, icom -> {
108  IElephantEntity iissue = Entities.getController(icom.getIssue());
109  if(!iissue.isEmpty()) {
110  String path = DossierPU.getObjectPath(icom);
111  icoacts.add(icom.getModification(), path, iissue.getPath(), iissue.getHierarchicalPath());
112  }
113  });
114  }
Here is the call graph for this function:

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