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

Public Member Functions

List< Interestcollect (IContact contact, ParticipationReason... reasons)
 
List< Interestreversed (IContact contact, ParticipationReason... reasons)
 

Detailed Description

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

Definition at line 40 of file DossierInterestCollector.java.

Member Function Documentation

◆ collect()

List<Interest> org.turro.interest.DossierInterestCollector.collect ( IContact  contact,
ParticipationReason...  reasons 
)

Implements org.turro.interest.InterestCollector.

Definition at line 43 of file DossierInterestCollector.java.

43  {
44  ArrayList<Interest> list = new ArrayList<>();
45  if(Arrays.binarySearch(reasons, ParticipationReason.REASON_PARTICIPATE) > -1) {
46  SqlClause.select("ep").from("Participant ep")
47  .where().equal("idContact", contact.getId())
48  .and().notEqual("role", ParticipantRole.PARTICIPANT_SUBJECT)
49  .dao(dao.get())
50  .resultList(Participant.class)
51  .forEach(ep -> {
52  if(ep.getDossier() != null) {
53  list.add(new Interest(ParticipationReason.REASON_PARTICIPATE,
54  Entities.getController(ep.getDossier()), false));
55  }
56  });
57  SqlClause.select("ep").from("CategoryParticipant ep")
58  .where().equal("idContact", contact.getId())
59  .and().notEqual("role", ParticipantRole.PARTICIPANT_SUBJECT)
60  .dao(dao.get())
61  .resultList(CategoryParticipant.class)
62  .forEach(ep -> {
63  if(ep.getCategory() != null) {
64  list.add(new Interest(ParticipationReason.REASON_PARTICIPATE,
65  Entities.getController(ep.getCategory()), false));
66  }
67  });
68  }
69  return list;
70  }
Here is the call graph for this function:

◆ reversed()

List<Interest> org.turro.interest.DossierInterestCollector.reversed ( IContact  contact,
ParticipationReason...  reasons 
)

Implements org.turro.interest.InterestCollector.

Definition at line 73 of file DossierInterestCollector.java.

73  {
74  return Collections.EMPTY_LIST;
75  }

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