aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r--src/org/traccar/database/SimpleObjectManager.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/org/traccar/database/SimpleObjectManager.java b/src/org/traccar/database/SimpleObjectManager.java
index 6cb7ff260..282dea46e 100644
--- a/src/org/traccar/database/SimpleObjectManager.java
+++ b/src/org/traccar/database/SimpleObjectManager.java
@@ -67,10 +67,6 @@ public abstract class SimpleObjectManager {
items.clear();
}
- protected void removeCachedItem(long itemId) {
- items.remove(itemId);
- }
-
public final Set<Long> getUserItems(long userId) {
if (!userItems.containsKey(userId)) {
userItems.put(userId, new HashSet<Long>());
@@ -104,7 +100,7 @@ public abstract class SimpleObjectManager {
}
for (Long cachedItemId : items.keySet()) {
if (!databaseItemIds.contains(cachedItemId)) {
- items.remove(cachedItemId);
+ removeCachedItem(cachedItemId);
}
}
} catch (SQLException error) {
@@ -145,6 +141,10 @@ public abstract class SimpleObjectManager {
updateCachedItem(item);
}
+ protected void removeCachedItem(long itemId) {
+ items.remove(itemId);
+ }
+
public void removeItem(long itemId) throws SQLException {
BaseModel item = getById(itemId);
if (item != null) {