aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/database/SimpleObjectManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2022-02-13 23:34:25 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2022-02-13 23:34:25 -0800
commit1c73bae2e23242673e0a07cdbc2493700f134ceb (patch)
treed1105368628b5f64fabb657682df58f1641e4d54 /src/main/java/org/traccar/database/SimpleObjectManager.java
parentde110b28ce8adb6ba875d88ede6e8f86dae4dd48 (diff)
downloadtrackermap-server-1c73bae2e23242673e0a07cdbc2493700f134ceb.tar.gz
trackermap-server-1c73bae2e23242673e0a07cdbc2493700f134ceb.tar.bz2
trackermap-server-1c73bae2e23242673e0a07cdbc2493700f134ceb.zip
New storage implementation
Diffstat (limited to 'src/main/java/org/traccar/database/SimpleObjectManager.java')
-rw-r--r--src/main/java/org/traccar/database/SimpleObjectManager.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/database/SimpleObjectManager.java b/src/main/java/org/traccar/database/SimpleObjectManager.java
index eb8284d4e..78701720f 100644
--- a/src/main/java/org/traccar/database/SimpleObjectManager.java
+++ b/src/main/java/org/traccar/database/SimpleObjectManager.java
@@ -16,7 +16,6 @@
*/
package org.traccar.database;
-import java.sql.SQLException;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
@@ -28,6 +27,7 @@ import org.traccar.Context;
import org.traccar.model.BaseModel;
import org.traccar.model.Permission;
import org.traccar.model.User;
+import org.traccar.storage.StorageException;
public abstract class SimpleObjectManager<T extends BaseModel> extends BaseObjectManager<T>
implements ManagableObjects {
@@ -83,7 +83,7 @@ public abstract class SimpleObjectManager<T extends BaseModel> extends BaseObjec
Set<Long> items = userItems.computeIfAbsent(permission.getOwnerId(), key -> new HashSet<>());
items.add(permission.getPropertyId());
}
- } catch (SQLException | ClassNotFoundException error) {
+ } catch (StorageException | ClassNotFoundException error) {
LOGGER.warn("Error getting permissions", error);
} finally {
writeUnlock();
@@ -92,7 +92,7 @@ public abstract class SimpleObjectManager<T extends BaseModel> extends BaseObjec
}
@Override
- public void removeItem(long itemId) throws SQLException {
+ public void removeItem(long itemId) throws StorageException {
super.removeItem(itemId);
refreshUserItems();
}