aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/DataManager.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-07-24 17:02:39 +0500
committerAbyss777 <abyss@fox5.ru>2017-07-24 17:02:39 +0500
commitaf00329fd0addf84071927dbc18cb0b4e5345f2b (patch)
tree8a8def831332ed70e63544b54c70bcf82e777fbb /src/org/traccar/database/DataManager.java
parentd6c7cdf1e103c977ed94b737dc838d7ac22b9fa7 (diff)
downloadtrackermap-server-af00329fd0addf84071927dbc18cb0b4e5345f2b.tar.gz
trackermap-server-af00329fd0addf84071927dbc18cb0b4e5345f2b.tar.bz2
trackermap-server-af00329fd0addf84071927dbc18cb0b4e5345f2b.zip
Use Permission instead of Map
Diffstat (limited to 'src/org/traccar/database/DataManager.java')
-rw-r--r--src/org/traccar/database/DataManager.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index 80b9f98e9..862efbc91 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -23,7 +23,6 @@ import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Date;
-import java.util.Map;
import javax.naming.InitialContext;
import javax.sql.DataSource;
@@ -41,6 +40,7 @@ import org.traccar.helper.Log;
import org.traccar.model.AttributeAlias;
import org.traccar.model.Device;
import org.traccar.model.Event;
+import org.traccar.model.Permission;
import org.traccar.model.BaseModel;
import org.traccar.model.Position;
import org.traccar.model.Server;
@@ -293,10 +293,10 @@ public class DataManager {
return QueryBuilder.create(dataSource, getQuery(query)).executeQuery(clazz);
}
- public Collection<Map<String, Long>> getPermissions(Class<? extends BaseModel> owner,
- Class<? extends BaseModel> property) throws SQLException {
+ public Collection<Permission> getPermissions(Class<? extends BaseModel> owner,
+ Class<? extends BaseModel> property) throws SQLException, ClassNotFoundException {
String query = "database.select" + owner.getSimpleName() + property.getSimpleName() + "s";
- return QueryBuilder.create(dataSource, getQuery(query)).executeMapQuery(Long.class);
+ return QueryBuilder.create(dataSource, getQuery(query)).executePermissionsQuery();
}
public void addObject(BaseModel entity) throws SQLException {