1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
private void updateTimelimit(BookingStatus currentStatus, IOrder order) {
if (currentStatus.getTimeLimit() != null &&
order.getTimelimit().compareTo(currentStatus.getTimeLimit()) != 0) {
try {
SimpleDateFormat df = new SimpleDateFormat("dd.MM.yy HH:mm:ss");
String oldTimelimit = df.format(order.getTimelimit());
String newTimelimit = df.format(currentStatus.getTimeLimit());
order.setTimelimit(currentStatus.getTimeLimit());
MailLogger.log("Changed timelimit of order with ID: " + order.getId() + " from old timelimit " + oldTimelimit + " to new one " + newTimelimit);
} catch (HibernateException e) {
MailLogger.log("!", e);
logger.debug("Error updating timelimit: ", e);
}
}
}