◆ getActivities()
EntityActivitySet org.turro.activity.CommonsLastActivity.getActivities |
( |
Date |
from, |
|
|
String |
entityPath, |
|
|
String |
type |
|
) |
| |
Implements org.turro.activity.ILastActivity.
Definition at line 39 of file CommonsLastActivity.java.
40 EntityActivitySet
set =
new EntityActivitySet();
41 SqlClause.select(
"poll").from(
"Poll poll")
42 .where().greater(
"poll.deadline", from)
43 .and().equal(
"poll.entityPath", entityPath)
44 .dao(getDao()).forEach(Poll.class, poll -> {
45 DefaultEntityLastActivity ela = new DefaultEntityLastActivity(
46 poll, poll.getEntityPath(), poll.getDeadline(),
"Related polls");
47 ela.setSortPath(Entities.getController(poll).getHierarchicalPath());
50 ParticipationInfo pi =
new ParticipationInfo(entityPath,
null);
51 pi.getAnyParticipations(from, participation -> {
52 DefaultEntityLastActivity ela =
new DefaultEntityLastActivity(
53 participation, participation.getEntityPath(), participation.getParticipationDate(), participation.getReason().toString());
54 ela.setSortPath(Entities.getController(participation).getHierarchicalPath());
◆ getMainEntity()
Object org.turro.activity.CommonsLastActivity.getMainEntity |
( |
Object |
entity | ) |
|
◆ getPolls()
void org.turro.activity.CommonsLastActivity.getPolls |
( |
String |
path, |
|
|
Date |
from, |
|
|
Consumer< Poll > |
action |
|
) |
| |
Definition at line 65 of file CommonsLastActivity.java.
66 WhereClause wc =
new WhereClause();
67 wc.addClause(
"select poll from Poll as poll");
68 wc.addClause(
"where poll.deadline >= :date");
69 wc.addNamedValue(
"date", from);
70 wc.addClause(
"and poll.entityPath = :path");
71 wc.addNamedValue(
"path", path);
72 getDao().forEach(Poll.class, wc, action);
The documentation for this class was generated from the following file: