diff options
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r-- | src/org/traccar/database/QueryBuilder.java | 5 | ||||
-rw-r--r-- | src/org/traccar/database/QueryIgnore.java | 26 |
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 { +} |