add micrometer @Timing annotations to Controllers+Repositories + ArchTest #128

Merged
hsh-michaelhoennig merged 6 commits from feature/add-micrometer-timing-measurements into master 2024-12-05 10:32:34 +01:00
20 changed files with 94 additions and 94 deletions
Showing only changes of commit ed9e824179 - Show all commits

View File

@ -9,9 +9,9 @@ import java.util.UUID;
public interface HsBookingDebitorRepository extends Repository<HsBookingDebitorEntity, UUID> {
@Timed("app.bookingDebitor.repo.findByUuid")
@Timed("app.booking.debitor.repo.findByUuid")
Optional<HsBookingDebitorEntity> findByUuid(UUID id);
@Timed("app.bookingDebitor.repo.findByDebitorNumber")
@Timed("app.booking.debitor.repo.findByDebitorNumber")
List<HsBookingDebitorEntity> findByDebitorNumber(int debitorNumber);
}

View File

@ -32,7 +32,7 @@ public class HsOfficeBankAccountController implements HsOfficeBankAccountsApi {
@Override
@Transactional(readOnly = true)
@Timed("app.bankAccounts.api.patchDebitor")
@Timed("app.office.bankAccounts.api.patchDebitor")
public ResponseEntity<List<HsOfficeBankAccountResource>> getListOfBankAccounts(
final String currentSubject,
final String assumedRoles,
@ -47,7 +47,7 @@ public class HsOfficeBankAccountController implements HsOfficeBankAccountsApi {
@Override
@Transactional
@Timed("app.bankAccounts.api.postNewBankAccount")
@Timed("app.office.bankAccounts.api.postNewBankAccount")
public ResponseEntity<HsOfficeBankAccountResource> postNewBankAccount(
final String currentSubject,
final String assumedRoles,
@ -74,7 +74,7 @@ public class HsOfficeBankAccountController implements HsOfficeBankAccountsApi {
@Override
@Transactional(readOnly = true)
@Timed("app.bankAccounts.api.getSingleBankAccountByUuid")
@Timed("app.office.bankAccounts.api.getSingleBankAccountByUuid")
public ResponseEntity<HsOfficeBankAccountResource> getSingleBankAccountByUuid(
final String currentSubject,
final String assumedRoles,
@ -91,7 +91,7 @@ public class HsOfficeBankAccountController implements HsOfficeBankAccountsApi {
@Override
@Transactional
@Timed("app.bankAccounts.api.deleteBankAccountByUuid")
@Timed("app.office.bankAccounts.api.deleteBankAccountByUuid")
public ResponseEntity<Void> deleteBankAccountByUuid(
final String currentSubject,
final String assumedRoles,

View File

@ -10,7 +10,7 @@ import java.util.UUID;
public interface HsOfficeBankAccountRepository extends Repository<HsOfficeBankAccountEntity, UUID> {
@Timed("app.bankAccounts.repo.findByUuid")
@Timed("app.office.bankAccounts.repo.findByUuid")
Optional<HsOfficeBankAccountEntity> findByUuid(UUID id);
@Query("""
@ -18,7 +18,7 @@ public interface HsOfficeBankAccountRepository extends Repository<HsOfficeBankAc
WHERE lower(c.holder) like lower(concat(:holder, '%'))
ORDER BY c.holder
""")
@Timed("app.bankAccounts.repo.findByOptionalHolderLikeImpl")
@Timed("app.office.bankAccounts.repo.findByOptionalHolderLikeImpl")
List<HsOfficeBankAccountEntity> findByOptionalHolderLikeImpl(String holder);
default List<HsOfficeBankAccountEntity> findByOptionalHolderLike(String holder) {
@ -26,15 +26,15 @@ public interface HsOfficeBankAccountRepository extends Repository<HsOfficeBankAc
}
@Timed("app.bankAccounts.repo.findByIbanOrderByIbanAsc")
@Timed("app.office.bankAccounts.repo.findByIbanOrderByIbanAsc")
List<HsOfficeBankAccountEntity> findByIbanOrderByIbanAsc(String iban);
@Timed("app.bankAccounts.repo.save")
@Timed("app.office.bankAccounts.repo.save")
<S extends HsOfficeBankAccountEntity> S save(S entity);
@Timed("app.bankAccounts.repo.deleteByUuid")
@Timed("app.office.bankAccounts.repo.deleteByUuid")
int deleteByUuid(final UUID uuid);
@Timed("app.bankAccounts.repo.count")
@Timed("app.office.bankAccounts.repo.count")
long count();
}

View File

@ -34,7 +34,7 @@ public class HsOfficeContactController implements HsOfficeContactsApi {
@Override
@Transactional(readOnly = true)
@Timed("app.contacts.api.getListOfContacts")
@Timed("app.office.contacts.api.getListOfContacts")
public ResponseEntity<List<HsOfficeContactResource>> getListOfContacts(
final String currentSubject,
final String assumedRoles,
@ -49,7 +49,7 @@ public class HsOfficeContactController implements HsOfficeContactsApi {
@Override
@Transactional
@Timed("app.contacts.api.postNewContact")
@Timed("app.office.contacts.api.postNewContact")
public ResponseEntity<HsOfficeContactResource> postNewContact(
final String currentSubject,
final String assumedRoles,
@ -72,7 +72,7 @@ public class HsOfficeContactController implements HsOfficeContactsApi {
@Override
@Transactional(readOnly = true)
@Timed("app.contacts.api.getSingleContactByUuid")
@Timed("app.office.contacts.api.getSingleContactByUuid")
public ResponseEntity<HsOfficeContactResource> getSingleContactByUuid(
final String currentSubject,
final String assumedRoles,
@ -89,7 +89,7 @@ public class HsOfficeContactController implements HsOfficeContactsApi {
@Override
@Transactional
@Timed("app.contacts.api.deleteContactByUuid")
@Timed("app.office.contacts.api.deleteContactByUuid")
public ResponseEntity<Void> deleteContactByUuid(
final String currentSubject,
final String assumedRoles,
@ -106,7 +106,7 @@ public class HsOfficeContactController implements HsOfficeContactsApi {
@Override
@Transactional
@Timed("app.contacts.api.patchContact")
@Timed("app.office.contacts.api.patchContact")
public ResponseEntity<HsOfficeContactResource> patchContact(
final String currentSubject,
final String assumedRoles,

View File

@ -10,7 +10,7 @@ import java.util.UUID;
public interface HsOfficeContactRbacRepository extends Repository<HsOfficeContactRbacEntity, UUID> {
@Timed("app.contacts.repo.findByUuid.rbac")
@Timed("app.office.contacts.repo.findByUuid.rbac")
Optional<HsOfficeContactRbacEntity> findByUuid(UUID id);
@Query("""
@ -18,15 +18,15 @@ public interface HsOfficeContactRbacRepository extends Repository<HsOfficeContac
WHERE :caption is null
OR c.caption like concat(cast(:caption as text), '%')
""")
@Timed("app.contacts.repo.findContactByOptionalCaptionLike.rbac")
@Timed("app.office.contacts.repo.findContactByOptionalCaptionLike.rbac")
List<HsOfficeContactRbacEntity> findContactByOptionalCaptionLike(String caption);
@Timed("app.contacts.repo.save.rbac")
@Timed("app.office.contacts.repo.save.rbac")
HsOfficeContactRbacEntity save(final HsOfficeContactRbacEntity entity);
@Timed("app.contacts.repo.deleteByUuid.rbac")
@Timed("app.office.contacts.repo.deleteByUuid.rbac")
int deleteByUuid(final UUID uuid);
@Timed("app.contacts.repo.count.rbac")
@Timed("app.office.contacts.repo.count.rbac")
long count();
}

View File

@ -10,7 +10,7 @@ import java.util.UUID;
public interface HsOfficeContactRealRepository extends Repository<HsOfficeContactRealEntity, UUID> {
@Timed("app.repo.contacts.findByUuid.real")
@Timed("app.office.contacts.repo.findByUuid.real")
Optional<HsOfficeContactRealEntity> findByUuid(UUID id);
@Query("""
@ -18,15 +18,15 @@ public interface HsOfficeContactRealRepository extends Repository<HsOfficeContac
WHERE :caption is null
OR c.caption like concat(cast(:caption as text), '%')
""")
@Timed("app.repo.contacts.findContactByOptionalCaptionLike.real")
@Timed("app.office.contacts.repo.findContactByOptionalCaptionLike.real")
List<HsOfficeContactRealEntity> findContactByOptionalCaptionLike(String caption);
@Timed("app.repo.contacts.save.real")
@Timed("app.office.contacts.repo.save.real")
HsOfficeContactRealEntity save(final HsOfficeContactRealEntity entity);
@Timed("app.repo.contacts.deleteByUuid.real")
@Timed("app.office.contacts.repo.deleteByUuid.real")
int deleteByUuid(final UUID uuid);
@Timed("app.repo.contacts.count.real")
@Timed("app.office.contacts.repo.count.real")
long count();
}

View File

@ -56,7 +56,7 @@ public class HsOfficeCoopAssetsTransactionController implements HsOfficeCoopAsse
@Override
@Transactional(readOnly = true)
@Timed("app.coopAssets.api.getListOfCoopAssets")
@Timed("app.office.coopAssets.api.getListOfCoopAssets")
public ResponseEntity<List<HsOfficeCoopAssetsTransactionResource>> getListOfCoopAssets(
final String currentSubject,
final String assumedRoles,
@ -79,7 +79,7 @@ public class HsOfficeCoopAssetsTransactionController implements HsOfficeCoopAsse
@Override
@Transactional
@Timed("app.coopAssets.api.postNewCoopAssetTransaction")
@Timed("app.office.coopAssets.api.postNewCoopAssetTransaction")
public ResponseEntity<HsOfficeCoopAssetsTransactionResource> postNewCoopAssetTransaction(
final String currentSubject,
final String assumedRoles,
@ -105,7 +105,7 @@ public class HsOfficeCoopAssetsTransactionController implements HsOfficeCoopAsse
@Override
@Transactional(readOnly = true)
@Timed("app.coopAssets.api.getSingleCoopAssetTransactionByUuid")
@Timed("app.office.coopAssets.api.getSingleCoopAssetTransactionByUuid")
public ResponseEntity<HsOfficeCoopAssetsTransactionResource> getSingleCoopAssetTransactionByUuid(
final String currentSubject, final String assumedRoles, final UUID assetTransactionUuid) {

View File

@ -11,7 +11,7 @@ import java.util.UUID;
public interface HsOfficeCoopAssetsTransactionRepository extends Repository<HsOfficeCoopAssetsTransactionEntity, UUID> {
@Timed("app.coopAssets.repo.findByUuid")
@Timed("app.office.coopAssets.repo.findByUuid")
Optional<HsOfficeCoopAssetsTransactionEntity> findByUuid(UUID id);
@Query("""
@ -21,13 +21,13 @@ public interface HsOfficeCoopAssetsTransactionRepository extends Repository<HsOf
AND ( CAST(:toValueDate AS java.time.LocalDate)IS NULL OR (at.valueDate <= :toValueDate))
ORDER BY at.membership.memberNumberSuffix, at.valueDate
""")
@Timed("app.coopAssets.repo.findCoopAssetsTransactionByOptionalMembershipUuidAndDateRange")
@Timed("app.office.coopAssets.repo.findCoopAssetsTransactionByOptionalMembershipUuidAndDateRange")
List<HsOfficeCoopAssetsTransactionEntity> findCoopAssetsTransactionByOptionalMembershipUuidAndDateRange(
UUID membershipUuid, LocalDate fromValueDate, LocalDate toValueDate);
@Timed("app.coopAssets.repo.save")
@Timed("app.office.coopAssets.repo.save")
HsOfficeCoopAssetsTransactionEntity save(final HsOfficeCoopAssetsTransactionEntity entity);
@Timed("app.coopAssets.repo.count")
@Timed("app.office.coopAssets.repo.count")
long count();
}

View File

@ -41,7 +41,7 @@ public class HsOfficeCoopSharesTransactionController implements HsOfficeCoopShar
@Override
@Transactional(readOnly = true)
@Timed("app.coopShares.api.getListOfCoopShares")
@Timed("app.office.coopShares.api.getListOfCoopShares")
public ResponseEntity<List<HsOfficeCoopSharesTransactionResource>> getListOfCoopShares(
final String currentSubject,
final String assumedRoles,
@ -61,7 +61,7 @@ public class HsOfficeCoopSharesTransactionController implements HsOfficeCoopShar
@Override
@Transactional
@Timed("app.coopShares.repo.postNewCoopSharesTransaction")
@Timed("app.office.coopShares.repo.postNewCoopSharesTransaction")
public ResponseEntity<HsOfficeCoopSharesTransactionResource> postNewCoopSharesTransaction(
final String currentSubject,
final String assumedRoles,
@ -85,7 +85,7 @@ public class HsOfficeCoopSharesTransactionController implements HsOfficeCoopShar
@Override
@Transactional(readOnly = true)
@Timed("app.coopShares.repo.getSingleCoopShareTransactionByUuid")
@Timed("app.office.coopShares.repo.getSingleCoopShareTransactionByUuid")
public ResponseEntity<HsOfficeCoopSharesTransactionResource> getSingleCoopShareTransactionByUuid(
final String currentSubject, final String assumedRoles, final UUID shareTransactionUuid) {

View File

@ -11,7 +11,7 @@ import java.util.UUID;
public interface HsOfficeCoopSharesTransactionRepository extends Repository<HsOfficeCoopSharesTransactionEntity, UUID> {
@Timed("app.coopShares.repo.findByUuid")
@Timed("app.office.coopShares.repo.findByUuid")
Optional<HsOfficeCoopSharesTransactionEntity> findByUuid(UUID id);
@Query("""
@ -21,13 +21,13 @@ public interface HsOfficeCoopSharesTransactionRepository extends Repository<HsOf
AND ( CAST(:toValueDate AS java.time.LocalDate)IS NULL OR (st.valueDate <= :toValueDate))
ORDER BY st.membership.memberNumberSuffix, st.valueDate
""")
@Timed("app.coopShares.repo.findCoopSharesTransactionByOptionalMembershipUuidAndDateRange")
@Timed("app.office.coopShares.repo.findCoopSharesTransactionByOptionalMembershipUuidAndDateRange")
List<HsOfficeCoopSharesTransactionEntity> findCoopSharesTransactionByOptionalMembershipUuidAndDateRange(
UUID membershipUuid, LocalDate fromValueDate, LocalDate toValueDate);
@Timed("app.coopShares.repo.save")
@Timed("app.office.coopShares.repo.save")
HsOfficeCoopSharesTransactionEntity save(final HsOfficeCoopSharesTransactionEntity entity);
@Timed("app.coopShares.repo.count")
@Timed("app.office.coopShares.repo.count")
long count();
}

View File

@ -52,7 +52,7 @@ public class HsOfficeDebitorController implements HsOfficeDebitorsApi {
@Override
@Transactional(readOnly = true)
@Timed("app.debitors.api.getListOfDebitors")
@Timed("app.office.debitors.api.getListOfDebitors")
public ResponseEntity<List<HsOfficeDebitorResource>> getListOfDebitors(
final String currentSubject,
final String assumedRoles,
@ -70,7 +70,7 @@ public class HsOfficeDebitorController implements HsOfficeDebitorsApi {
@Override
@Transactional
@Timed("app.debitors.api.postNewDebitor")
@Timed("app.office.debitors.api.postNewDebitor")
public ResponseEntity<HsOfficeDebitorResource> postNewDebitor(
String currentSubject,
String assumedRoles,
@ -118,7 +118,7 @@ public class HsOfficeDebitorController implements HsOfficeDebitorsApi {
@Override
@Transactional(readOnly = true)
@Timed("app.debitors.api.getSingleDebitorByUuid")
@Timed("app.office.debitors.api.getSingleDebitorByUuid")
public ResponseEntity<HsOfficeDebitorResource> getSingleDebitorByUuid(
final String currentSubject,
final String assumedRoles,
@ -135,7 +135,7 @@ public class HsOfficeDebitorController implements HsOfficeDebitorsApi {
@Override
@Transactional
@Timed("app.debitors.api.deleteDebitorByUuid")
@Timed("app.office.debitors.api.deleteDebitorByUuid")
public ResponseEntity<Void> deleteDebitorByUuid(
final String currentSubject,
final String assumedRoles,
@ -152,7 +152,7 @@ public class HsOfficeDebitorController implements HsOfficeDebitorsApi {
@Override
@Transactional
@Timed("app.debitors.api.patchDebitor")
@Timed("app.office.debitors.api.patchDebitor")
public ResponseEntity<HsOfficeDebitorResource> patchDebitor(
final String currentSubject,
final String assumedRoles,

View File

@ -10,7 +10,7 @@ import java.util.UUID;
public interface HsOfficeDebitorRepository extends Repository<HsOfficeDebitorEntity, UUID> {
@Timed("app.debitors.repo.findByUuid")
@Timed("app.office.debitors.repo.findByUuid")
Optional<HsOfficeDebitorEntity> findByUuid(UUID id);
@Query("""
@ -21,7 +21,7 @@ public interface HsOfficeDebitorRepository extends Repository<HsOfficeDebitorEnt
WHERE partner.partnerNumber = :partnerNumber
AND debitor.debitorNumberSuffix = :debitorNumberSuffix
""")
@Timed("app.debitors.repo.findDebitorByPartnerNumberAndDebitorNumberSuffix")
@Timed("app.office.debitors.repo.findDebitorByPartnerNumberAndDebitorNumberSuffix")
List<HsOfficeDebitorEntity> findDebitorByPartnerNumberAndDebitorNumberSuffix(int partnerNumber, String debitorNumberSuffix);
default List<HsOfficeDebitorEntity> findDebitorByDebitorNumber(int debitorNumber) {
@ -49,15 +49,15 @@ public interface HsOfficeDebitorRepository extends Repository<HsOfficeDebitorEnt
OR person.givenName like concat(cast(:name as text), '%')
OR contact.caption like concat(cast(:name as text), '%')
""")
@Timed("app.debitors.repo.findDebitorByOptionalNameLike")
@Timed("app.office.debitors.repo.findDebitorByOptionalNameLike")
List<HsOfficeDebitorEntity> findDebitorByOptionalNameLike(String name);
@Timed("app.debitors.repo.save")
@Timed("app.office.debitors.repo.save")
HsOfficeDebitorEntity save(final HsOfficeDebitorEntity entity);
@Timed("app.debitors.repo.count")
@Timed("app.office.debitors.repo.count")
long count();
@Timed("app.debitors.repo.deleteByUuid")
@Timed("app.office.debitors.repo.deleteByUuid")
int deleteByUuid(UUID uuid);
}

View File

@ -51,7 +51,7 @@ public class HsOfficePartnerController implements HsOfficePartnersApi {
@Override
@Transactional(readOnly = true)
@Timed("app.partners.api.getListOfPartners")
@Timed("app.office.partners.api.getListOfPartners")
public ResponseEntity<List<HsOfficePartnerResource>> getListOfPartners(
final String currentSubject,
final String assumedRoles,
@ -66,7 +66,7 @@ public class HsOfficePartnerController implements HsOfficePartnersApi {
@Override
@Transactional
@Timed("app.partners.api.postNewPartner")
@Timed("app.office.partners.api.postNewPartner")
public ResponseEntity<HsOfficePartnerResource> postNewPartner(
final String currentSubject,
final String assumedRoles,
@ -89,7 +89,7 @@ public class HsOfficePartnerController implements HsOfficePartnersApi {
@Override
@Transactional(readOnly = true)
@Timed("app.partners.api.getSinglePartnerByUuid")
@Timed("app.office.partners.api.getSinglePartnerByUuid")
public ResponseEntity<HsOfficePartnerResource> getSinglePartnerByUuid(
final String currentSubject,
final String assumedRoles,
@ -106,7 +106,7 @@ public class HsOfficePartnerController implements HsOfficePartnersApi {
@Override
@Transactional
@Timed("app.partners.api.deletePartnerByUuid")
@Timed("app.office.partners.api.deletePartnerByUuid")
public ResponseEntity<Void> deletePartnerByUuid(
final String currentSubject,
final String assumedRoles,
@ -127,7 +127,7 @@ public class HsOfficePartnerController implements HsOfficePartnersApi {
@Override
@Transactional
@Timed("app.partners.api.patchPartner")
@Timed("app.office.partners.api.patchPartner")
public ResponseEntity<HsOfficePartnerResource> patchPartner(
final String currentSubject,
final String assumedRoles,

View File

@ -10,10 +10,10 @@ import java.util.UUID;
public interface HsOfficePartnerRepository extends Repository<HsOfficePartnerEntity, UUID> {
@Timed("app.partners.repo.findByUuid")
@Timed("app.office.partners.repo.findByUuid")
Optional<HsOfficePartnerEntity> findByUuid(UUID id);
@Timed("app.partners.repo.findAll")
@Timed("app.office.partners.repo.findAll")
List<HsOfficePartnerEntity> findAll(); // TODO.refa: move to a repo in test sources
@Query("""
@ -28,18 +28,18 @@ public interface HsOfficePartnerRepository extends Repository<HsOfficePartnerEnt
OR person.givenName like concat(cast(:name as text), '%')
OR person.familyName like concat(cast(:name as text), '%')
""")
@Timed("app.partners.repo.findPartnerByOptionalNameLike")
@Timed("app.office.partners.repo.findPartnerByOptionalNameLike")
List<HsOfficePartnerEntity> findPartnerByOptionalNameLike(String name);
@Timed("app.partners.repo.findPartnerByPartnerNumber")
@Timed("app.office.partners.repo.findPartnerByPartnerNumber")
HsOfficePartnerEntity findPartnerByPartnerNumber(Integer partnerNumber);
@Timed("app.partners.repo.save")
@Timed("app.office.partners.repo.save")
HsOfficePartnerEntity save(final HsOfficePartnerEntity entity);
@Timed("app.partners.repo.count")
@Timed("app.office.partners.repo.count")
long count();
@Timed("app.partners.repo.deleteByUuid")
@Timed("app.office.partners.repo.deleteByUuid")
int deleteByUuid(UUID uuid);
}

View File

@ -31,7 +31,7 @@ public class HsOfficePersonController implements HsOfficePersonsApi {
@Override
@Transactional(readOnly = true)
@Timed("app.persons.api.getListOfPersons")
@Timed("app.office.persons.api.getListOfPersons")
public ResponseEntity<List<HsOfficePersonResource>> getListOfPersons(
final String currentSubject,
final String assumedRoles,
@ -46,7 +46,7 @@ public class HsOfficePersonController implements HsOfficePersonsApi {
@Override
@Transactional
@Timed("app.persons.api.postNewPerson")
@Timed("app.office.persons.api.postNewPerson")
public ResponseEntity<HsOfficePersonResource> postNewPerson(
final String currentSubject,
final String assumedRoles,
@ -69,7 +69,7 @@ public class HsOfficePersonController implements HsOfficePersonsApi {
@Override
@Transactional(readOnly = true)
@Timed("app.persons.api.getSinglePersonByUuid")
@Timed("app.office.persons.api.getSinglePersonByUuid")
public ResponseEntity<HsOfficePersonResource> getSinglePersonByUuid(
final String currentSubject,
final String assumedRoles,
@ -86,7 +86,7 @@ public class HsOfficePersonController implements HsOfficePersonsApi {
@Override
@Transactional
@Timed("app.persons.api.deletePersonByUuid")
@Timed("app.office.persons.api.deletePersonByUuid")
public ResponseEntity<Void> deletePersonByUuid(
final String currentSubject,
final String assumedRoles,
@ -103,7 +103,7 @@ public class HsOfficePersonController implements HsOfficePersonsApi {
@Override
@Transactional
@Timed("app.persons.api.patchPerson")
@Timed("app.office.persons.api.patchPerson")
public ResponseEntity<HsOfficePersonResource> patchPerson(
final String currentSubject,
final String assumedRoles,

View File

@ -10,7 +10,7 @@ import java.util.UUID;
public interface HsOfficePersonRepository extends Repository<HsOfficePersonEntity, UUID> {
@Timed("app.persons.repo.findByUuid.rbac")
@Timed("app.office.persons.repo.findByUuid.rbac")
Optional<HsOfficePersonEntity> findByUuid(UUID personUuid);
@Query("""
@ -20,15 +20,15 @@ public interface HsOfficePersonRepository extends Repository<HsOfficePersonEntit
OR p.givenName like concat(cast(:name as text), '%')
OR p.familyName like concat(cast(:name as text), '%')
""")
@Timed("app.persons.repo.findPersonByOptionalNameLike.rbac")
@Timed("app.office.persons.repo.findPersonByOptionalNameLike.rbac")
List<HsOfficePersonEntity> findPersonByOptionalNameLike(String name);
@Timed("app.persons.repo.save.rbac")
@Timed("app.office.persons.repo.save.rbac")
HsOfficePersonEntity save(final HsOfficePersonEntity entity);
@Timed("app.persons.repo.deleteByUuid.rbac")
@Timed("app.office.persons.repo.deleteByUuid.rbac")
int deleteByUuid(final UUID personUuid);
@Timed("app.persons.repo.count.rbac")
@Timed("app.office.persons.repo.count.rbac")
long count();
}

View File

@ -44,7 +44,7 @@ public class HsOfficeRelationController implements HsOfficeRelationsApi {
@Override
@Transactional(readOnly = true)
@Timed("app.relations.api.getListOfRelations")
@Timed("app.office.relations.api.getListOfRelations")
public ResponseEntity<List<HsOfficeRelationResource>> getListOfRelations(
final String currentSubject,
final String assumedRoles,
@ -67,7 +67,7 @@ public class HsOfficeRelationController implements HsOfficeRelationsApi {
@Override
@Transactional
@Timed("app.relations.api.postNewRelation")
@Timed("app.office.relations.api.postNewRelation")
public ResponseEntity<HsOfficeRelationResource> postNewRelation(
final String currentSubject,
final String assumedRoles,
@ -102,7 +102,7 @@ public class HsOfficeRelationController implements HsOfficeRelationsApi {
@Override
@Transactional(readOnly = true)
@Timed("app.relations.api.getSingleRelationByUuid")
@Timed("app.office.relations.api.getSingleRelationByUuid")
public ResponseEntity<HsOfficeRelationResource> getSingleRelationByUuid(
final String currentSubject,
final String assumedRoles,
@ -136,7 +136,7 @@ public class HsOfficeRelationController implements HsOfficeRelationsApi {
@Override
@Transactional
@Timed("app.relations.api.patchRelation")
@Timed("app.office.relations.api.patchRelation")
public ResponseEntity<HsOfficeRelationResource> patchRelation(
final String currentSubject,
final String assumedRoles,

View File

@ -11,14 +11,14 @@ import java.util.UUID;
public interface HsOfficeRelationRbacRepository extends Repository<HsOfficeRelationRbacEntity, UUID> {
@Timed("app.relations.repo.findByUuid.rbac")
@Timed("app.office.relations.repo.findByUuid.rbac")
Optional<HsOfficeRelationRbacEntity> findByUuid(UUID id);
@Query(value = """
SELECT p.* FROM hs_office.relation_rv AS p
WHERE p.anchorUuid = :personUuid OR p.holderUuid = :personUuid
""", nativeQuery = true)
@Timed("app.relations.repo.findRelationRelatedToPersonUuid.rbac")
@Timed("app.office.relations.repo.findRelationRelatedToPersonUuid.rbac")
List<HsOfficeRelationRbacEntity> findRelationRelatedToPersonUuid(@NotNull UUID personUuid);
/**
@ -54,20 +54,20 @@ public interface HsOfficeRelationRbacRepository extends Repository<HsOfficeRelat
OR lower(CAST(rel.contact.emailAddresses AS String)) LIKE :contactData
OR lower(CAST(rel.contact.phoneNumbers AS String)) LIKE :contactData )
""")
@Timed("app.relations.repo.findRelationRelatedToPersonUuidRelationTypePersonAndContactDataImpl.rbac")
@Timed("app.office.relations.repo.findRelationRelatedToPersonUuidRelationTypePersonAndContactDataImpl.rbac")
List<HsOfficeRelationRbacEntity> findRelationRelatedToPersonUuidRelationTypePersonAndContactDataImpl(
final UUID personUuid,
final String relationType,
final String personData,
final String contactData);
@Timed("app.relations.repo.save.rbac")
@Timed("app.office.relations.repo.save.rbac")
HsOfficeRelationRbacEntity save(final HsOfficeRelationRbacEntity entity);
@Timed("app.relations.repo.count.rbac")
@Timed("app.office.relations.repo.count.rbac")
long count();
@Timed("app.relations.repo.deleteByUuid.rbac")
@Timed("app.office.relations.repo.deleteByUuid.rbac")
int deleteByUuid(UUID uuid);
private static String toSqlLikeOperand(final String text) {

View File

@ -39,7 +39,7 @@ public class HsOfficeSepaMandateController implements HsOfficeSepaMandatesApi {
@Override
@Transactional(readOnly = true)
@Timed("app.sepaMandates.api.getListOfSepaMandates")
@Timed("app.office.sepaMandates.api.getListOfSepaMandates")
public ResponseEntity<List<HsOfficeSepaMandateResource>> getListOfSepaMandates(
final String currentSubject,
final String assumedRoles,
@ -55,7 +55,7 @@ public class HsOfficeSepaMandateController implements HsOfficeSepaMandatesApi {
@Override
@Transactional
@Timed("app.sepaMandates.api.postNewSepaMandate")
@Timed("app.office.sepaMandates.api.postNewSepaMandate")
public ResponseEntity<HsOfficeSepaMandateResource> postNewSepaMandate(
final String currentSubject,
final String assumedRoles,
@ -79,7 +79,7 @@ public class HsOfficeSepaMandateController implements HsOfficeSepaMandatesApi {
@Override
@Transactional(readOnly = true)
@Timed("app.sepaMandates.api.getSingleSepaMandateByUuid")
@Timed("app.office.sepaMandates.api.getSingleSepaMandateByUuid")
public ResponseEntity<HsOfficeSepaMandateResource> getSingleSepaMandateByUuid(
final String currentSubject,
final String assumedRoles,
@ -97,7 +97,7 @@ public class HsOfficeSepaMandateController implements HsOfficeSepaMandatesApi {
@Override
@Transactional
@Timed("app.sepaMandates.api.deleteSepaMandateByUuid")
@Timed("app.office.sepaMandates.api.deleteSepaMandateByUuid")
public ResponseEntity<Void> deleteSepaMandateByUuid(
final String currentSubject,
final String assumedRoles,
@ -114,7 +114,7 @@ public class HsOfficeSepaMandateController implements HsOfficeSepaMandatesApi {
@Override
@Transactional
@Timed("app.sepaMandates.api.patchSepaMandate")
@Timed("app.office.sepaMandates.api.patchSepaMandate")
public ResponseEntity<HsOfficeSepaMandateResource> patchSepaMandate(
final String currentSubject,
final String assumedRoles,

View File

@ -10,7 +10,7 @@ import java.util.UUID;
public interface HsOfficeSepaMandateRepository extends Repository<HsOfficeSepaMandateEntity, UUID> {
@Timed("app.sepaMandates.repo.findByUuid")
@Timed("app.office.sepaMandates.repo.findByUuid")
Optional<HsOfficeSepaMandateEntity> findByUuid(UUID id);
@Query("""
@ -19,15 +19,15 @@ public interface HsOfficeSepaMandateRepository extends Repository<HsOfficeSepaMa
OR mandate.bankAccount.iban like concat(cast(:iban as text), '%')
ORDER BY mandate.bankAccount.iban
""")
@Timed("app.sepaMandates.repo.findSepaMandateByOptionalIban")
@Timed("app.office.sepaMandates.repo.findSepaMandateByOptionalIban")
List<HsOfficeSepaMandateEntity> findSepaMandateByOptionalIban(String iban);
@Timed("app.sepaMandates.repo.save")
@Timed("app.office.sepaMandates.repo.save")
HsOfficeSepaMandateEntity save(final HsOfficeSepaMandateEntity entity);
@Timed("app.sepaMandates.repo.count")
@Timed("app.office.sepaMandates.repo.count")
long count();
@Timed("app.sepaMandates.repo.deleteByUuid")
@Timed("app.office.sepaMandates.repo.deleteByUuid")
int deleteByUuid(UUID uuid);
}