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 TypeMethodDescriptionfindByUserIdAndTypeAndChannel(String userId, String type, ChannelType channel) 查某使用者對某型別×通道的偏好;租戶範圍由@TenantIdfilter 自動限縮Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findByUserIdAndTypeAndChannel
查某使用者對某型別×通道的偏好;租戶範圍由@TenantIdfilter 自動限縮
-