diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-06-11 14:20:06 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-06-11 14:20:06 +1200 |
commit | 26e1ba286424d5ee623e8941cae7cf0b3625c870 (patch) | |
tree | 812748a9516801cd07bb20006d4c9afddce1a65b /src/org/traccar/database/DataManager.java | |
parent | f7f676fa802ded698af55b48d6fea19ec9da4696 (diff) | |
parent | 5dc81b6197b9a1387adffdc2628c24ca483d2376 (diff) | |
download | trackermap-server-26e1ba286424d5ee623e8941cae7cf0b3625c870.tar.gz trackermap-server-26e1ba286424d5ee623e8941cae7cf0b3625c870.tar.bz2 trackermap-server-26e1ba286424d5ee623e8941cae7cf0b3625c870.zip |
Merge pull request #1243 from al3x1s/master
Remove double quotes from config
Diffstat (limited to 'src/org/traccar/database/DataManager.java')
-rw-r--r-- | src/org/traccar/database/DataManager.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java index 9633ada58..35e9cff95 100644 --- a/src/org/traccar/database/DataManager.java +++ b/src/org/traccar/database/DataManager.java @@ -46,6 +46,7 @@ import org.traccar.model.Permission; import org.traccar.model.Position; import org.traccar.model.Server; import org.traccar.model.User; +import org.traccar.model.Alert; import com.mchange.v2.c3p0.ComboPooledDataSource; @@ -322,5 +323,10 @@ public class DataManager { .setObject(server) .executeUpdate(); } - -} + + public Collection<Alert> getAlertsByDevice(Long deviceId) throws SQLException { + return QueryBuilder.create(dataSource, properties.getProperty("database.getAlertsByDevice")) + .setLong("deviceId", deviceId) + .executeQuery(new Alert()); + } +}
\ No newline at end of file |