aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/DataManager.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-07-20 17:12:29 +0500
committerAbyss777 <abyss@fox5.ru>2017-07-20 17:12:29 +0500
commite00fbfa466b17e94f59e6ff8fefb83f08999b3ec (patch)
tree61302b7e3535f75925a2896a358ba0bb2492ca71 /src/org/traccar/database/DataManager.java
parent0d5a1b36c704f3a79eceb2a1f19894f0438eb1b0 (diff)
downloadtrackermap-server-e00fbfa466b17e94f59e6ff8fefb83f08999b3ec.tar.gz
trackermap-server-e00fbfa466b17e94f59e6ff8fefb83f08999b3ec.tar.bz2
trackermap-server-e00fbfa466b17e94f59e6ff8fefb83f08999b3ec.zip
Rename Identifiable and Extensible to BaseModel and ExtendedModel
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 6c9cca86c..7497294a1 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -41,7 +41,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.Identifiable;
+import org.traccar.model.BaseModel;
import org.traccar.model.Position;
import org.traccar.model.Server;
import org.traccar.model.Statistics;
@@ -285,21 +285,21 @@ public class DataManager {
return QueryBuilder.create(dataSource, getQuery(query)).executeQuery(clazz);
}
- public void addObject(Identifiable entity) throws SQLException {
+ public void addObject(BaseModel entity) throws SQLException {
String query = "database.insert" + entity.getClass().getSimpleName();
entity.setId(QueryBuilder.create(dataSource, getQuery(query), true)
.setObject(entity)
.executeUpdate());
}
- public void updateObject(Identifiable entity) throws SQLException {
+ public void updateObject(BaseModel entity) throws SQLException {
String query = "database.update" + entity.getClass().getSimpleName();
QueryBuilder.create(dataSource, getQuery(query))
.setObject(entity)
.executeUpdate();
}
- public void removeObject(Class<? extends Identifiable> clazz, long entityId) throws SQLException {
+ public void removeObject(Class<? extends BaseModel> clazz, long entityId) throws SQLException {
String query = "database.delete" + clazz.getSimpleName();
QueryBuilder.create(dataSource, getQuery(query))
.setLong("id", entityId)