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

Public Member Functions

EntityActivitySet getActivities (Date from, String entityPath, String type)
 
Object getMainEntity (Object entity)
 
List getComments (String path, Date from, String select)
 
List getStars (String path, Date from, String select)
 
List getVotes (String path, Date from, String select)
 
List getConvocations (String path, Date from, String select)
 

Detailed Description

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

Definition at line 38 of file ContactLastActivity.java.

Member Function Documentation

◆ getActivities()

EntityActivitySet org.turro.activity.ContactLastActivity.getActivities ( Date  from,
String  entityPath,
String  type 
)

Implements org.turro.activity.ILastActivity.

Definition at line 41 of file ContactLastActivity.java.

41  {
42  EntityActivitySet set = new EntityActivitySet();
43  for(Object obj : getComments(entityPath, from, null)) {
44  CommentIt comment = (CommentIt) obj;
45  IElephantEntity iee = comment.getOwnerEntity();
46  DefaultEntityLastActivity ela = new DefaultEntityLastActivity(
47  comment, iee.getPath(), comment.getDateCreation(), "Commented");
48  ela.setSortPath(iee.getHierarchicalPath());
49  set.add(ela);
50  }
51  for(Object obj : getStars(entityPath, from, null)) {
52  StarIt star = (StarIt) obj;
53  IElephantEntity iee = star.getOwnerEntity();
54  DefaultEntityLastActivity ela = new DefaultEntityLastActivity(
55  star, iee.getPath(), star.getDateCreation(), "Stared");
56  ela.setSortPath(iee.getHierarchicalPath());
57  set.add(ela);
58  }
59  for(Object obj : getVotes(entityPath, from, null)) {
60  VoteIt vote = (VoteIt) obj;
61  IElephantEntity iee = vote.getOwnerEntity();
62  DefaultEntityLastActivity ela = new DefaultEntityLastActivity(
63  vote, iee.getPath(), vote.getDateCreation(), "Voted");
64  ela.setSortPath(iee.getHierarchicalPath());
65  set.add(ela);
66  }
67  for(Object obj : getConvocations(entityPath, from, null)) {
68  Convocation convocation = (Convocation) obj;
69  DefaultEntityLastActivity ela = new DefaultEntityLastActivity(
70  convocation, ContactsPU.getObjectPath(convocation), convocation.getCallDate(), "Convoked");
71  set.add(ela);
72  }
73  return set;
74  }
List getConvocations(String path, Date from, String select)
List getStars(String path, Date from, String select)
List getVotes(String path, Date from, String select)
List getComments(String path, Date from, String select)
Here is the call graph for this function:

◆ getComments()

List org.turro.activity.ContactLastActivity.getComments ( String  path,
Date  from,
String  select 
)

Definition at line 81 of file ContactLastActivity.java.

81  {
82  WhereClause wc = new WhereClause();
83  wc.addClause("select comment" + check(select) + " from CommentIt as comment");
84  wc.addClause("where comment.dateCreation >= :date");
85  wc.addNamedValue("date", from);
86  if(!Strings.isBlank(path)) {
87  wc.addClause("and path like :path");
88  wc.addNamedValue("path", path + "%");
89  }
90  return getDao().getResultList(wc);
91  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getConvocations()

List org.turro.activity.ContactLastActivity.getConvocations ( String  path,
Date  from,
String  select 
)

Definition at line 117 of file ContactLastActivity.java.

117  {
118  WhereClause wc = new WhereClause();
119  wc.addClause("select convocation" + check(select) + " from Convocation as convocation");
120  wc.addClause("where convocation.callDate >= :date");
121  wc.addNamedValue("date", from);
122  if(!Strings.isBlank(path)) {
123  wc.addClause("and entityPath like :path");
124  wc.addNamedValue("path", path + "%");
125  }
126  return getDao().getResultList(wc);
127  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMainEntity()

Object org.turro.activity.ContactLastActivity.getMainEntity ( Object  entity)

Implements org.turro.activity.ILastActivity.

Definition at line 77 of file ContactLastActivity.java.

77  {
78  return null;
79  }

◆ getStars()

List org.turro.activity.ContactLastActivity.getStars ( String  path,
Date  from,
String  select 
)

Definition at line 93 of file ContactLastActivity.java.

93  {
94  WhereClause wc = new WhereClause();
95  wc.addClause("select star" + check(select) + " from StarIt as star");
96  wc.addClause("where star.dateCreation >= :date");
97  wc.addNamedValue("date", from);
98  if(!Strings.isBlank(path)) {
99  wc.addClause("and path like :path");
100  wc.addNamedValue("path", path + "%");
101  }
102  return getDao().getResultList(wc);
103  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getVotes()

List org.turro.activity.ContactLastActivity.getVotes ( String  path,
Date  from,
String  select 
)

Definition at line 105 of file ContactLastActivity.java.

105  {
106  WhereClause wc = new WhereClause();
107  wc.addClause("select vote" + check(select) + " from VoteIt as vote");
108  wc.addClause("where vote.dateCreation >= :date");
109  wc.addNamedValue("date", from);
110  if(!Strings.isBlank(path)) {
111  wc.addClause("and path like :path");
112  wc.addNamedValue("path", path + "%");
113  }
114  return getDao().getResultList(wc);
115  }
Here is the call graph for this function:
Here is the caller graph for this function:

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