diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-08-10 04:54:59 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-08-10 04:54:59 +1200 |
commit | 2bc3832f20dd6319701b78a0ece8f8551e86b9db (patch) | |
tree | ac87efb68ec989527cb28308d9b767bd2febdf8d /src/org/traccar/database | |
parent | 3e16121df8402269ae9f69c80ebe6d4eaaff43a6 (diff) | |
download | traccar-server-2bc3832f20dd6319701b78a0ece8f8551e86b9db.tar.gz traccar-server-2bc3832f20dd6319701b78a0ece8f8551e86b9db.tar.bz2 traccar-server-2bc3832f20dd6319701b78a0ece8f8551e86b9db.zip |
Minor code cleanup
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r-- | src/org/traccar/database/DataManager.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java index 17c1299e8..be42d6d3e 100644 --- a/src/org/traccar/database/DataManager.java +++ b/src/org/traccar/database/DataManager.java @@ -419,12 +419,12 @@ public class DataManager { } } - public static String makeNameId(Class<?> clazz) { + private static String makeNameId(Class<?> clazz) { String name = clazz.getSimpleName(); - return Introspector.decapitalize(name) + (name.indexOf("Id") == -1 ? "Id" : ""); + return Introspector.decapitalize(name) + (!name.contains("Id") ? "Id" : ""); } - public Collection<Permission> getPermissions(Class<? extends BaseModel> owner, Class<? extends BaseModel> property) + private Collection<Permission> getPermissions(Class<? extends BaseModel> owner, Class<? extends BaseModel> property) throws SQLException, ClassNotFoundException { return QueryBuilder.create(dataSource, getQuery(ACTION_SELECT_ALL, owner, property)) .executePermissionsQuery(); |