From 1a3fad80ee6e07db6bc8e504b314b5074cce6ad2 Mon Sep 17 00:00:00 2001 From: "Marc O. Sandlus" Date: Fri, 2 Feb 2024 09:02:28 +0100 Subject: [PATCH] wip initial commit --- .../hs/office/person/HsOfficePersonEntity.java | 10 +++++++++- .../office/person/HsOfficePersonEntityPatcher.java | 2 ++ .../hs-office/hs-office-person-schemas.yaml | 14 ++++++++++++++ .../db/changelog/210-hs-office-person.sql | 2 ++ 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonEntity.java b/src/main/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonEntity.java index fde3972b..f36ce946 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonEntity.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonEntity.java @@ -27,6 +27,8 @@ public class HsOfficePersonEntity implements HasUuid, Stringifyable { private static Stringify toString = stringify(HsOfficePersonEntity.class, "person") .withProp(Fields.personType, HsOfficePersonEntity::getPersonType) .withProp(Fields.tradeName, HsOfficePersonEntity::getTradeName) + .withProp(Fields.salutation, HsOfficePersonEntity::getSalutation) + .withProp(Fields.title, HsOfficePersonEntity::getTitle) .withProp(Fields.familyName, HsOfficePersonEntity::getFamilyName) .withProp(Fields.givenName, HsOfficePersonEntity::getGivenName); @@ -40,6 +42,12 @@ public class HsOfficePersonEntity implements HasUuid, Stringifyable { @Column(name = "tradename") private String tradeName; + @Column(name = "salutation") + private String salutation; + + @Column(name = "title") + private String title; + @Column(name = "familyname") private String familyName; @@ -54,6 +62,6 @@ public class HsOfficePersonEntity implements HasUuid, Stringifyable { @Override public String toShortString() { return personType + " " + - (!StringUtils.isEmpty(tradeName) ? tradeName : (familyName + ", " + givenName)); + (!StringUtils.isEmpty(tradeName) ? tradeName : (StringUtils.isEmpty(salutation) ? "" : salutation + " ") + (familyName + ", " + givenName)); } } diff --git a/src/main/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonEntityPatcher.java b/src/main/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonEntityPatcher.java index d1d3fa8c..ede3fc03 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonEntityPatcher.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonEntityPatcher.java @@ -22,6 +22,8 @@ class HsOfficePersonEntityPatcher implements EntityPatcher