aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/QueryBuilder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-05-03 12:09:00 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-05-03 12:09:00 +1200
commit18127a2dfc362ffd7de4110e013a10a9f894469b (patch)
tree24ced00567acbc751985b71ffd99ce067213a34d /src/org/traccar/database/QueryBuilder.java
parent427113e0aabf1b8ab54288263c3e809f292a5a05 (diff)
downloadtrackermap-server-18127a2dfc362ffd7de4110e013a10a9f894469b.tar.gz
trackermap-server-18127a2dfc362ffd7de4110e013a10a9f894469b.tar.bz2
trackermap-server-18127a2dfc362ffd7de4110e013a10a9f894469b.zip
Implmenet reflection json conversion
Diffstat (limited to 'src/org/traccar/database/QueryBuilder.java')
-rw-r--r--src/org/traccar/database/QueryBuilder.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/org/traccar/database/QueryBuilder.java b/src/org/traccar/database/QueryBuilder.java
index 29a737f20..d05f48c09 100644
--- a/src/org/traccar/database/QueryBuilder.java
+++ b/src/org/traccar/database/QueryBuilder.java
@@ -15,7 +15,6 @@
*/
package org.traccar.database;
-import java.beans.Introspector;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.sql.PreparedStatement;
@@ -176,17 +175,17 @@ public class QueryBuilder {
String name = method.getName().substring(3);
try {
if (method.getReturnType().equals(boolean.class)) {
- return setBoolean(name, (Boolean) method.invoke(object));
+ setBoolean(name, (Boolean) method.invoke(object));
} else if (method.getReturnType().equals(int.class)) {
- return setInteger(name, (Integer) method.invoke(object));
+ setInteger(name, (Integer) method.invoke(object));
} else if (method.getReturnType().equals(long.class)) {
- return setLong(name, (Long) method.invoke(object));
+ setLong(name, (Long) method.invoke(object));
} else if (method.getReturnType().equals(double.class)) {
- return setDouble(name, (Double) method.invoke(object));
+ setDouble(name, (Double) method.invoke(object));
} else if (method.getReturnType().equals(String.class)) {
- return setString(name, (String) method.invoke(object));
+ setString(name, (String) method.invoke(object));
} else if (method.getReturnType().equals(Date.class)) {
- return setDate(name, (Date) method.invoke(object));
+ setDate(name, (Date) method.invoke(object));
}
} catch (IllegalAccessException error) {
} catch (InvocationTargetException error) {