Nueva propiedad para obtener displayname.

This commit is contained in:
Marcos Garcia Nuñez
2019-12-09 21:19:52 +01:00
parent 8c75f9bac8
commit 26172fe50d
2 changed files with 9 additions and 1 deletions

View File

@@ -42,6 +42,10 @@ public class MedicalSpecialtyTO implements Serializable {
this.description = description; this.description = description;
} }
public String getDisplayDescription() {
return String.format("[%s] %s", this.name, this.description);
}
@Override @Override
public String toString() { public String toString() {
return String.format("%s[name=%s]", getClass().getSimpleName(), getName()); return String.format("%s[name=%s]", getClass().getSimpleName(), getName());

View File

@@ -42,9 +42,13 @@ public class PrimaryHealthCareCenterTO implements Serializable {
public void setLocation(String description) { public void setLocation(String description) {
this.location = description; this.location = description;
} }
public String getDisplayDescription() {
return String.format("[%s] %s", this.name, this.location);
}
@Override @Override
public String toString() { public String toString() {
return String.format("%s[name=%s]", getClass().getSimpleName(), getName()); return String.format("%s[name=%s]", getClass().getSimpleName(), this.getName());
} }
} }