aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/model
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-03 17:06:30 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-03 17:06:30 -0700
commit4030d3207c157a3fcee2653c18440898b6b2a2e6 (patch)
treeb7e04a72bd369f75871edf832f7ff58198001a85 /src/main/java/org/traccar/model
parent65b0f9c5398ddcb28018cb1963108534c638b1f4 (diff)
downloadtrackermap-server-4030d3207c157a3fcee2653c18440898b6b2a2e6.tar.gz
trackermap-server-4030d3207c157a3fcee2653c18440898b6b2a2e6.tar.bz2
trackermap-server-4030d3207c157a3fcee2653c18440898b6b2a2e6.zip
Remove attributes manager
Diffstat (limited to 'src/main/java/org/traccar/model')
-rw-r--r--src/main/java/org/traccar/model/Permission.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/main/java/org/traccar/model/Permission.java b/src/main/java/org/traccar/model/Permission.java
index bace6b7d4..41dfa43e4 100644
--- a/src/main/java/org/traccar/model/Permission.java
+++ b/src/main/java/org/traccar/model/Permission.java
@@ -31,12 +31,12 @@ import org.traccar.storage.QueryIgnore;
public class Permission {
- private static final Map<String, Class<?>> CLASSES = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
+ private static final Map<String, Class<? extends BaseModel>> CLASSES = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
static {
try {
for (Class<?> clazz : ClassScanner.findSubclasses(BaseModel.class)) {
- CLASSES.put(clazz.getSimpleName(), clazz);
+ CLASSES.put(clazz.getSimpleName(), (Class<? extends BaseModel>) clazz);
}
} catch (IOException | ReflectiveOperationException | URISyntaxException e) {
throw new RuntimeException(e);
@@ -45,9 +45,9 @@ public class Permission {
private final LinkedHashMap<String, Long> data;
- private final Class<?> ownerClass;
+ private final Class<? extends BaseModel> ownerClass;
private final long ownerId;
- private final Class<?> propertyClass;
+ private final Class<? extends BaseModel> propertyClass;
private final long propertyId;
public Permission(LinkedHashMap<String, Long> data) {
@@ -61,7 +61,9 @@ public class Permission {
propertyId = property.getValue();
}
- public Permission(Class<?> ownerClass, long ownerId, Class<?> propertyClass, long propertyId) {
+ public Permission(
+ Class<? extends BaseModel> ownerClass, long ownerId,
+ Class<? extends BaseModel> propertyClass, long propertyId) {
this.ownerClass = ownerClass;
this.ownerId = ownerId;
this.propertyClass = propertyClass;
@@ -105,7 +107,7 @@ public class Permission {
@QueryIgnore
@JsonIgnore
- public Class<?> getOwnerClass() {
+ public Class<? extends BaseModel> getOwnerClass() {
return ownerClass;
}
@@ -117,7 +119,7 @@ public class Permission {
@QueryIgnore
@JsonIgnore
- public Class<?> getPropertyClass() {
+ public Class<? extends BaseModel> getPropertyClass() {
return propertyClass;
}