21
21
* @author magnudae, henrigs
23
23
public class HibernateAlertStore extends HibernateGenericStore<Alert> {
26
26
* Get all the alerts which are should be send at the current time.
27
27
* @return the alerts that should be sent now
29
29
public Set<Alert> getAlertsDueNow(){
31
31
// make sure no one gets an alert one day too late
32
32
final long TWELVE_HOURS_IN_MILLIS = (1000*60*60*12);
33
33
long twelveHoursIntoFutureFromCurrentTime = System.currentTimeMillis() + TWELVE_HOURS_IN_MILLIS;
35
35
return new HashSet<Alert>( getCriteria( Restrictions.le("alertDate", twelveHoursIntoFutureFromCurrentTime) ).list() );
40
40
* Updates an alert with a new date and message when a program stage instance is updated
41
41
* @param programStageInstanceId