aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-02-28 08:09:10 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-02-28 16:11:07 +1300
commit9120ff19ab2bdd466ae5c30632efd1917faa71b1 (patch)
tree7cbac795c7f2ec56a5e0ed0e474642a2113222dc /src/org/traccar/database
parent39452c3e0af164e6d63696afaf874c13c7ee8b5f (diff)
downloadtrackermap-server-9120ff19ab2bdd466ae5c30632efd1917faa71b1.tar.gz
trackermap-server-9120ff19ab2bdd466ae5c30632efd1917faa71b1.tar.bz2
trackermap-server-9120ff19ab2bdd466ae5c30632efd1917faa71b1.zip
Add separate QueryIgnore annotation (fix #2962)
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r--src/org/traccar/database/QueryBuilder.java5
-rw-r--r--src/org/traccar/database/QueryIgnore.java26
2 files changed, 28 insertions, 3 deletions
diff --git a/src/org/traccar/database/QueryBuilder.java b/src/org/traccar/database/QueryBuilder.java
index 83bc5de2e..a24e6f0bf 100644
--- a/src/org/traccar/database/QueryBuilder.java
+++ b/src/org/traccar/database/QueryBuilder.java
@@ -15,7 +15,6 @@
*/
package org.traccar.database;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.core.JsonProcessingException;
import org.traccar.Context;
import org.traccar.helper.Log;
@@ -262,7 +261,7 @@ public final class QueryBuilder {
for (Method method : methods) {
if (method.getName().startsWith("get") && method.getParameterTypes().length == 0
- && !method.isAnnotationPresent(JsonIgnore.class)) {
+ && !method.isAnnotationPresent(QueryIgnore.class)) {
String name = method.getName().substring(3);
try {
if (method.getReturnType().equals(boolean.class)) {
@@ -427,7 +426,7 @@ public final class QueryBuilder {
for (final Method method : methods) {
if (method.getName().startsWith("set") && method.getParameterTypes().length == 1
- && !method.isAnnotationPresent(JsonIgnore.class)) {
+ && !method.isAnnotationPresent(QueryIgnore.class)) {
final String name = method.getName().substring(3);
diff --git a/src/org/traccar/database/QueryIgnore.java b/src/org/traccar/database/QueryIgnore.java
new file mode 100644
index 000000000..ac835cf2f
--- /dev/null
+++ b/src/org/traccar/database/QueryIgnore.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.database;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface QueryIgnore {
+}