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

Public Member Functions

EntityActivitySet getActivities (Date from, String entityPath, String type)
 
Object getMainEntity (Object entity)
 
void getAttachments (String path, Date from, Consumer< Attachment > action)
 

Detailed Description

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

Definition at line 35 of file AttachLastActivity.java.

Member Function Documentation

◆ getActivities()

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

Implements org.turro.activity.ILastActivity.

Definition at line 38 of file AttachLastActivity.java.

38  {
39  EntityActivitySet set = new EntityActivitySet();
40  getAttachments(entityPath, from, attachment -> {
41  IElephantEntity iee = attachment.getOwnerEntity();
42  DefaultEntityLastActivity ela = new DefaultEntityLastActivity(
43  attachment, iee.getPath(), attachment.getModification(), "Attached");
44  ela.setSortPath(iee.getHierarchicalPath());
45  set.add(ela);
46  });
47  return set;
48  }
void getAttachments(String path, Date from, Consumer< Attachment > action)
Here is the call graph for this function:

◆ getAttachments()

void org.turro.activity.AttachLastActivity.getAttachments ( String  path,
Date  from,
Consumer< Attachment action 
)

Definition at line 55 of file AttachLastActivity.java.

55  {
56  WhereClause wc = new WhereClause();
57  wc.addClause("select attachment from Attachment as attachment");
58  wc.addClause("where attachment.modification >= :date");
59  wc.addNamedValue("date", from);
60  if(!Strings.isBlank(path)) {
61  wc.addClause("and path like :path");
62  wc.addNamedValue("path", path + "%");
63  }
64  getDao().forEach(Attachment.class, wc, action);
65  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMainEntity()

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

Implements org.turro.activity.ILastActivity.

Definition at line 51 of file AttachLastActivity.java.

51  {
52  return null;
53  }

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