42 Activities topacts = Activities.of(
"New topic");
43 SqlClause.select(
"topic").from(
"Topic topic")
44 .where().greater(
"topic.creation", topacts.lastDate())
45 .dao(dao.get()).forEach(Topic.class, topic -> {
46 if(!topic.getEntity().isEmpty()) {
47 IElephantEntity itopic = Entities.getController(topic);
48 if(!itopic.isEmpty()) {
49 topacts.add(topic.getCreation(), itopic.getPath(), topic.getEntityPath(), itopic.getHierarchicalPath());
53 Activities ansacts = Activities.of(
"New answer");
54 SqlClause.select(
"post").from(
"Post post")
55 .where().greater(
"topic.creation", ansacts.lastDate())
56 .dao(dao.get()).forEach(Post.class, post -> {
57 if(!post.getTopic().getEntity().isEmpty()) {
58 IElephantEntity ipost = Entities.getController(post);
59 if(!ipost.isEmpty()) {
60 ansacts.add(post.getCreation(), ipost.getPath(), post.getTopic().getEntityPath(), ipost.getHierarchicalPath());
64 Activities pollacts = Activities.of(
"Related polls");
65 SqlClause.select(
"poll").from(
"Poll poll")
66 .where().greater(
"poll.deadline", pollacts.lastDate())
67 .dao(dao.get()).forEach(Poll.class, poll -> {
68 if(!poll.getEntity().isEmpty()) {
69 IElephantEntity ipoll = Entities.getController(poll);
70 if(!ipoll.isEmpty()) {
71 pollacts.add(poll.getDeadline(), ipoll.getPath(), poll.getEntityPath(), ipoll.getHierarchicalPath());
75 for(ParticipationReason reason : ParticipationReason.values()) {
76 Activities epacts = Activities.of(reason.toString());
77 SqlClause.select(
"ep").from(
"EntityParticipation ep")
78 .where().greater(
"ep.participationDate", epacts.lastDate())
79 .and().equal(
"ep.reason", reason)
80 .dao(dao.get()).forEach(EntityParticipation.class, ep -> {
81 if(!ep.getEntity().isEmpty()) {
82 String path = ElephantPU.getObjectPath(ep);
83 epacts.add(ep.getParticipationDate(), path, ep.getEntityPath(), ep.getEntity().getHierarchicalPath());