diff options
author | Anton Tananaev <anton@traccar.org> | 2022-06-14 18:50:48 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-06-14 18:50:48 -0700 |
commit | 0d5c7606c73d84aab44f69936ab62afa0b68939b (patch) | |
tree | 4e9cbebe1ddcd3e3b75a15bee8e23d05374ca434 /src/main/java/org/traccar/database/ExtendedObjectManager.java | |
parent | 415ba3ddb0f770b829c997beb3e575ffb6e195ec (diff) | |
download | trackermap-server-0d5c7606c73d84aab44f69936ab62afa0b68939b.tar.gz trackermap-server-0d5c7606c73d84aab44f69936ab62afa0b68939b.tar.bz2 trackermap-server-0d5c7606c73d84aab44f69936ab62afa0b68939b.zip |
Refactor notification manager
Diffstat (limited to 'src/main/java/org/traccar/database/ExtendedObjectManager.java')
-rw-r--r-- | src/main/java/org/traccar/database/ExtendedObjectManager.java | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/src/main/java/org/traccar/database/ExtendedObjectManager.java b/src/main/java/org/traccar/database/ExtendedObjectManager.java index 006ed47b2..fe0ebb96e 100644 --- a/src/main/java/org/traccar/database/ExtendedObjectManager.java +++ b/src/main/java/org/traccar/database/ExtendedObjectManager.java @@ -44,34 +44,6 @@ public abstract class ExtendedObjectManager<T extends BaseModel> extends SimpleO refreshExtendedPermissions(); } - public final Set<Long> getGroupItems(long groupId) { - try { - readLock(); - Set<Long> result = groupItems.get(groupId); - if (result != null) { - return new HashSet<>(result); - } else { - return new HashSet<>(); - } - } finally { - readUnlock(); - } - } - - public final Set<Long> getDeviceItems(long deviceId) { - try { - readLock(); - Set<Long> result = deviceItems.get(deviceId); - if (result != null) { - return new HashSet<>(result); - } else { - return new HashSet<>(); - } - } finally { - readUnlock(); - } - } - public Set<Long> getAllDeviceItems(long deviceId) { try { readLock(); @@ -122,7 +94,7 @@ public abstract class ExtendedObjectManager<T extends BaseModel> extends SimpleO .add(devicePermission.getPropertyId()); } - for (Device device : Context.getDeviceManager().getAllDevices()) { + for (Device device : getDataManager().getObjects(Device.class)) { long groupId = device.getGroupId(); while (groupId > 0) { deviceItemsWithGroups |