19 package org.turro.dossier.dossier;
21 import java.util.Date;
22 import java.util.List;
23 import org.amic.util.date.CheckDate;
24 import org.turro.dossier.db.DossierPU;
25 import org.turro.dossier.entity.Dossier;
26 import org.turro.dossier.entity.DossierStatus;
27 import org.turro.elephant.db.WhereClause;
28 import org.turro.i18n.I_;
29 import org.turro.scheduler.task.AbstractTask;
39 Date now =
new Date();
40 int days = Integer.parseInt(
getSettings().getData()) * -1;
41 Date from =
new CheckDate(now).addDays(days).getDate();
42 for(
Dossier dossier : getDossiers(now)) {
57 return I_.
get(
"Dossier notifier");
62 return I_.
get(
"Days");
65 private List<Dossier> getDossiers(Date now) {
67 wc.
addClause(
"select distinct dossier from Dossier as dossier");
68 wc.
addClause(
"where dossier.status <> :status");
void sendMail(IConstructor constructor)
void addClause(String clause)
void addNamedValue(String name, Object value)
static String get(String msg)
TaskSettings getSettings()
IConstructor getConstructor()