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

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 39 of file EntityInterestCollector.java.

Member Function Documentation

◆ collect()

List<Interest> org.turro.assistant.EntityInterestCollector.collect ( IContact  contact,
ParticipationReason...  reasons 
)

Implements org.turro.interest.InterestCollector.

Definition at line 42 of file EntityInterestCollector.java.

42  {
43  ArrayList<Interest> list = new ArrayList<>();
44  SqlClause.select("ep").from("EntityParticipation ep")
45  .where().equal("participatorPath", Entities.getController(contact.getContact()).getPath())
46  .and().in("reason", Arrays.asList(reasons))
47  .dao(dao.get())
48  .resultList(EntityParticipation.class)
49  .forEach(ep -> {
50  if(!ep.getEntity().isEmpty()) {
51  list.add(new Interest(ep.getReason(), ep.getEntity(), false));
52  }
53  });
54  return list;
55  }
Here is the call graph for this function:

◆ reversed()

List<Interest> org.turro.assistant.EntityInterestCollector.reversed ( IContact  contact,
ParticipationReason...  reasons 
)

Implements org.turro.interest.InterestCollector.

Definition at line 58 of file EntityInterestCollector.java.

58  {
59  ArrayList<Interest> list = new ArrayList<>();
60  SqlClause.select("ep").from("EntityParticipation ep")
61  .where().equal("entityPath", Entities.getController(contact.getContact()).getPath())
62  .and().in("reason", Arrays.asList(reasons))
63  .dao(dao.get())
64  .resultList(EntityParticipation.class)
65  .forEach(ep -> {
66  if(!ep.getEntity().isEmpty()) {
67  list.add(new Interest(ep.getReason(), ep.getParticipator(), true));
68  }
69  });
70  return list;
71  }
Here is the call graph for this function:

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