Interface NotificationPreferenceRepositoryBase<T extends NotificationPreferenceBase>

Type Parameters:
T - 應用宣告的具體偏好 entity(繼承 NotificationPreferenceBase
All Superinterfaces:
org.springframework.data.repository.CrudRepository<T,UUID>, org.springframework.data.jpa.repository.JpaRepository<T,UUID>, org.springframework.data.repository.ListCrudRepository<T,UUID>, org.springframework.data.repository.ListPagingAndSortingRepository<T,UUID>, org.springframework.data.repository.PagingAndSortingRepository<T,UUID>, org.springframework.data.repository.query.QueryByExampleExecutor<T>, org.springframework.data.repository.Repository<T,UUID>

@NoRepositoryBean public interface NotificationPreferenceRepositoryBase<T extends NotificationPreferenceBase> extends org.springframework.data.jpa.repository.JpaRepository<T,UUID>

通知偏好資料存取基底

ADR-017:jar 不擁有 具體 @Entity,本介面為 @NoRepositoryBean 泛型基底,由應用帶入具體 entity 型參成為可注入 repository。

查詢不帶 tenantId(決策三):tenant 專案的應用 entity 帶 @TenantId,Hibernate 於 Session 建構時自動加租戶條件;ownership 專案天然全域。故原本的「租戶 / 非租戶」雙查詢收斂為單一查詢。

Since:
4.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    查某使用者對某型別×通道的偏好;租戶範圍由 @TenantId filter 自動限縮

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Method Details

    • findByUserIdAndTypeAndChannel

      Optional<T> findByUserIdAndTypeAndChannel(String userId, String type, ChannelType channel)
      查某使用者對某型別×通道的偏好;租戶範圍由 @TenantId filter 自動限縮