- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 38 of file Sendables.java.
◆ cleanOrphans()
static void org.turro.sendable.Sendables.cleanOrphans |
( |
| ) |
|
|
static |
Definition at line 88 of file Sendables.java.
89 Dao dao =
new ElephantPU();
90 WhereClause wc =
new WhereClause();
91 wc.addClause(
"delete from SendableAssistant");
92 wc.addClause(
"where not exists (");
93 wc.addClause(
"select s from Sendable s");
94 wc.addClause(
"where s.entityPath = entityPath");
96 dao.executeUpdate(wc);
◆ delete()
static void org.turro.sendable.Sendables.delete |
( |
String |
entityPath | ) |
|
|
static |
Definition at line 99 of file Sendables.java.
100 Dao dao =
new ElephantPU();
101 WhereClause wc =
new WhereClause();
102 wc.addClause(
"delete from SendableAssistant");
103 wc.addClause(
"where entityPath = :path");
104 wc.addNamedValue(
"path", entityPath);
105 dao.executeUpdate(wc);
106 wc =
new WhereClause();
107 wc.addClause(
"delete from Sendable");
108 wc.addClause(
"where entityPath = :path");
109 wc.addNamedValue(
"path", entityPath);
110 dao.executeUpdate(wc);
◆ delivered()
static void org.turro.sendable.Sendables.delivered |
( |
String |
entityPath, |
|
|
String |
contactId |
|
) |
| |
|
static |
Definition at line 113 of file Sendables.java.
114 Dao dao =
new ElephantPU();
115 WhereClause wc =
new WhereClause();
116 wc.addClause(
"update SendableAssistant");
117 wc.addClause(
"set delivered = TRUE");
118 wc.addClause(
"where entityPath = :path");
119 wc.addNamedValue(
"path", entityPath);
120 wc.addClause(
"and contactId = :contact");
121 wc.addNamedValue(
"contact", contactId);
122 dao.executeUpdate(wc);
◆ getAssistants()
static Collection<SendableAssistant> org.turro.sendable.Sendables.getAssistants |
( |
String |
entityPath, |
|
|
boolean |
all |
|
) |
| |
|
static |
Definition at line 76 of file Sendables.java.
77 Dao dao =
new ElephantPU();
78 WhereClause wc =
new WhereClause();
79 wc.addClause(
"select sa from SendableAssistant sa");
80 wc.addClause(
"where sa.entityPath = :path");
81 wc.addNamedValue(
"path", entityPath);
83 wc.addClause(
"and sa.delivered = FALSE");
85 return dao.getResultList(wc);
◆ getSendable()
static Sendable org.turro.sendable.Sendables.getSendable |
( |
String |
entityPath | ) |
|
|
static |
Definition at line 67 of file Sendables.java.
68 Dao dao =
new ElephantPU();
69 WhereClause wc =
new WhereClause();
70 wc.addClause(
"select s from Sendable s");
71 wc.addClause(
"where s.entityPath = :path");
72 wc.addNamedValue(
"path", entityPath);
73 return (Sendable) dao.getSingleResultOrNull(wc);
◆ getSendables()
static Collection<Sendable> org.turro.sendable.Sendables.getSendables |
( |
| ) |
|
|
static |
Definition at line 57 of file Sendables.java.
58 Dao dao =
new ElephantPU();
59 WhereClause wc =
new WhereClause();
60 wc.addClause(
"select s from Sendable s");
61 wc.addClause(
"where s.sent = FALSE");
62 wc.addClause(
"and s.schedule < :now");
63 wc.addNamedValue(
"now",
new Date());
64 return dao.getResultList(wc);
◆ send()
static void org.turro.sendable.Sendables.send |
( |
IConstructor |
constructor | ) |
|
|
static |
Definition at line 40 of file Sendables.java.
41 boolean lockAcquired = SENDABLE_LOCK.tryLock();
45 IElephantEntity iee = Entities.getController(sendable.getEntityPath());
46 IElephantSendable is = iee.getSendable();
52 SENDABLE_LOCK.unlock();
static Collection< Sendable > getSendables()
◆ sent()
static void org.turro.sendable.Sendables.sent |
( |
String |
entityPath | ) |
|
|
static |
Definition at line 125 of file Sendables.java.
126 Dao dao =
new ElephantPU();
127 WhereClause wc =
new WhereClause();
128 wc.addClause(
"update Sendable");
129 wc.addClause(
"set sent = TRUE");
130 wc.addClause(
"where entityPath = :path");
131 wc.addNamedValue(
"path", entityPath);
132 dao.executeUpdate(wc);
The documentation for this class was generated from the following file: