19 package org.turro.assistant;
21 import java.util.ArrayList;
22 import java.util.Arrays;
23 import java.util.List;
24 import org.turro.elephant.db.ElephantPU;
25 import org.turro.elephant.entities.db.EntityParticipation;
26 import org.turro.entities.Entities;
27 import org.turro.interest.Interest;
28 import org.turro.interest.InterestCollector;
29 import org.turro.jpa.Dao;
30 import org.turro.participation.ParticipationReason;
31 import org.turro.plugin.contacts.IContact;
32 import org.turro.sql.SqlClause;
33 import org.turro.util.Cached;
43 ArrayList<Interest> list =
new ArrayList<>();
44 SqlClause.select(
"ep").from(
"EntityParticipation ep")
46 .and().in(
"reason", Arrays.asList(reasons))
50 if(!ep.getEntity().isEmpty()) {
51 list.add(new Interest(ep.getReason(), ep.getEntity(), false));
59 ArrayList<Interest> list =
new ArrayList<>();
60 SqlClause.select(
"ep").from(
"EntityParticipation ep")
62 .and().in(
"reason", Arrays.asList(reasons))
66 if(!ep.getEntity().isEmpty()) {
67 list.add(new Interest(ep.getReason(), ep.getParticipator(), true));
75 private final Cached<Dao> dao = Cached.instance(() ->
new ElephantPU());
List< Interest > collect(IContact contact, ParticipationReason... reasons)
List< Interest > reversed(IContact contact, ParticipationReason... reasons)
static IElephantEntity getController(String path)