19 package org.turro.assistant;
21 import java.util.function.Consumer;
22 import org.turro.elephant.db.ElephantPU;
23 import org.turro.elephant.db.WhereClause;
24 import org.turro.entities.Entities;
25 import org.turro.entities.ITreeEntity;
26 import org.turro.jpa.Dao;
27 import org.turro.participation.ParticipationReason;
28 import org.turro.plugin.contacts.IContact;
40 execute.accept(entity);
47 public <T>
void walkDownTree(
ITreeEntity entity, Consumer<ITreeEntity> execute) {
49 execute.accept(entity);
51 walkDownTree(e, execute);
60 wc.
addClause(
"delete from EntityParticipation");
61 wc.
addClause(
"where entityPath = :entityPath");
63 wc.
addClause(
"and participatorPath <> :participatorPath");
78 private Dao getDao() {
void walkUpTree(ITreeEntity entity, Consumer< ITreeEntity > execute)
void createFor(Object entity, IContact contact, ParticipationReason reason)
void deleteExceptFor(Object entity, IContact contact, ParticipationReason reason)
void addClause(String clause)
void addNamedValue(String name, Object value)
static IElephantEntity getController(String path)
int executeUpdate(String query)
Collection< ITreeEntity > getEntityChildren()
ITreeEntity getEntityParent()