aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/NotificationManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/database/NotificationManager.java')
-rw-r--r--src/org/traccar/database/NotificationManager.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/org/traccar/database/NotificationManager.java b/src/org/traccar/database/NotificationManager.java
index 11d5a9aca..0987f255b 100644
--- a/src/org/traccar/database/NotificationManager.java
+++ b/src/org/traccar/database/NotificationManager.java
@@ -49,7 +49,7 @@ public class NotificationManager {
public void updateEvent(Event event, Position position) {
try {
- dataManager.addEvent(event);
+ dataManager.addObject(event);
} catch (SQLException error) {
Log.warning(error);
}
@@ -105,7 +105,7 @@ public class NotificationManager {
notificationsLock.writeLock().lock();
try {
userNotifications.clear();
- for (Notification notification : dataManager.getNotifications()) {
+ for (Notification notification : dataManager.getObjects(Notification.class)) {
getUserNotificationsUnsafe(notification.getUserId()).add(notification);
}
} finally {
@@ -139,7 +139,7 @@ public class NotificationManager {
|| cachedNotification.getSms() != notification.getSms()) {
if (!notification.getWeb() && !notification.getMail() && !notification.getSms()) {
try {
- dataManager.removeNotification(cachedNotification);
+ dataManager.removeObject(Notification.class, cachedNotification.getId());
} catch (SQLException error) {
Log.warning(error);
}
@@ -160,7 +160,7 @@ public class NotificationManager {
notificationsLock.writeLock().unlock();
}
try {
- dataManager.updateNotification(cachedNotification);
+ dataManager.updateObject(cachedNotification);
} catch (SQLException error) {
Log.warning(error);
}
@@ -170,7 +170,7 @@ public class NotificationManager {
}
} else if (notification.getWeb() || notification.getMail() || notification.getSms()) {
try {
- dataManager.addNotification(notification);
+ dataManager.addObject(notification);
} catch (SQLException error) {
Log.warning(error);
}