BrightSide Workbench Full Report + Source Code
org.turro.assistant.ParticipationWalker Class Reference

Public Member Functions

void walkUpTree (ITreeEntity entity, Consumer< ITreeEntity > execute)
 
void deleteExceptFor (Object entity, IContact contact, ParticipationReason reason)
 
void createFor (Object entity, IContact contact, ParticipationReason reason)
 

Detailed Description

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

Definition at line 34 of file ParticipationWalker.java.

Member Function Documentation

◆ createFor()

void org.turro.assistant.ParticipationWalker.createFor ( Object  entity,
IContact  contact,
ParticipationReason  reason 
)

Definition at line 70 of file ParticipationWalker.java.

70  {
71  new ParticipationInfo(entity, contact, reason).check();
72  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteExceptFor()

void org.turro.assistant.ParticipationWalker.deleteExceptFor ( Object  entity,
IContact  contact,
ParticipationReason  reason 
)

Definition at line 58 of file ParticipationWalker.java.

58  {
59  WhereClause wc = new WhereClause();
60  wc.addClause("delete from EntityParticipation");
61  wc.addClause("where entityPath = :entityPath");
62  wc.addNamedValue("entityPath", Entities.getController(entity).getPath());
63  wc.addClause("and participatorPath <> :participatorPath");
64  wc.addNamedValue("participatorPath", Entities.getController(contact.getContact()).getPath());
65  wc.addClause("and reason = :reason");
66  wc.addNamedValue("reason", reason);
67  getDao().executeUpdate(wc);
68  }
int executeUpdate(String query)
Definition: Dao.java:463
Here is the call graph for this function:
Here is the caller graph for this function:

◆ walkUpTree()

void org.turro.assistant.ParticipationWalker.walkUpTree ( ITreeEntity  entity,
Consumer< ITreeEntity execute 
)

Definition at line 38 of file ParticipationWalker.java.

38  {
39  if(entity != null) {
40  execute.accept(entity);
41  walkUpTree(entity.getEntityParent(), execute);
42  }
43  }
void walkUpTree(ITreeEntity entity, Consumer< ITreeEntity > execute)
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: