diff --git a/hsarback/src/de/hsadmin/core/model/AnnFieldIO.java b/hsarback/src/de/hsadmin/core/model/AnnFieldIO.java index 105eaee..4486fae 100644 --- a/hsarback/src/de/hsadmin/core/model/AnnFieldIO.java +++ b/hsarback/src/de/hsadmin/core/model/AnnFieldIO.java @@ -13,4 +13,5 @@ public @interface AnnFieldIO { Class referTo() default Void.class; Class selectableValues() default DefaultSelectableValues.class; String[] referredProps() default { }; + String overwriteName() default ""; } diff --git a/hsarback/src/de/hsadmin/mods/user/UnixUser.java b/hsarback/src/de/hsadmin/mods/user/UnixUser.java index ed876d3..f89b809 100644 --- a/hsarback/src/de/hsadmin/mods/user/UnixUser.java +++ b/hsarback/src/de/hsadmin/mods/user/UnixUser.java @@ -69,11 +69,11 @@ public class UnixUser extends AbstractEntity implements Serializable { @Column(name = "locked", columnDefinition = "boolean") private boolean locked; - @AnnFieldIO(validation="[0-9]*", rw=ReadWriteAccess.READWRITE) + @AnnFieldIO(validation="[0-9]*", rw=ReadWriteAccess.READWRITE, overwriteName="quota_softlimit") @Column(name = "quota_softlimit", columnDefinition = "integer") private Integer quotaSoftlimit; - @AnnFieldIO(validation="[0-9]*", rw=ReadWriteAccess.READWRITE) + @AnnFieldIO(validation="[0-9]*", rw=ReadWriteAccess.READWRITE, overwriteName="quota_hardlimit") @Column(name = "quota_hardlimit", columnDefinition = "integer") private Integer quotaHardlimit; diff --git a/hsarback/src/de/hsadmin/remote/PropertyRemote.java b/hsarback/src/de/hsadmin/remote/PropertyRemote.java index a4d7595..6553d8a 100644 --- a/hsarback/src/de/hsadmin/remote/PropertyRemote.java +++ b/hsarback/src/de/hsadmin/remote/PropertyRemote.java @@ -40,6 +40,10 @@ public class PropertyRemote implements IRemote { if (fieldIO != null) { HashMap propertyProperties = new HashMap(); String fieldName = f.getName(); + String overwrite = fieldIO.overwriteName(); + if (overwrite != null && !overwrite.isEmpty()) { + fieldName = overwrite; + } propertyProperties.put("module", (String) moduleKey); propertyProperties.put("name", fieldName); propertyProperties.put("searchable", "equals");