split PersonEntity/Repo into Rbac and Real Entity/Repo and use in Relation for faster lazy loading #130

Merged
hsh-michaelhoennig merged 15 commits from feature/split-PersonEntity-and-Repo-into-Rbac-and-Real into master 2024-12-05 10:39:26 +01:00
Showing only changes of commit a7748d4ee8 - Show all commits

View File

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