Interface DocForumRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<DocForumEntity,
,Long> DomainIdRepository<DocForumEntity,
,Long> org.springframework.data.jpa.repository.JpaRepository<DocForumEntity,
,Long> org.springframework.data.jpa.repository.JpaSpecificationExecutor<DocForumEntity>
,org.springframework.data.repository.PagingAndSortingRepository<DocForumEntity,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<DocForumEntity>
,org.springframework.data.repository.Repository<DocForumEntity,
Long>
-
Method Summary
Modifier and TypeMethodDescriptionfindByIdAndDomainIdOrderByQuestionDateAsc
(Long id, Integer domainId) findByIdAndDomainIdOrderByQuestionDateDesc
(Long id, Integer domainId) findFirstByDocIdAndDomainIdOrderByQuestionDateDesc
(Integer docId, Integer domainId) getDocForumListAsc
(Integer docId, List<Integer> parentIds, Boolean deleted, Boolean confirmed, Integer domainId) getDocForumListDesc
(Integer docId, List<Integer> parentIds, Boolean deleted, Boolean confirmed, Integer domainId) getDocForumListForumIdParentId
(Integer docId, Boolean deleted, Boolean confirmed, Integer domainId) getDocForumListForumIdParentIdWithRootParents
(Integer docId, Boolean deleted, Boolean confirmed, Integer domainId) getForumStat
(Integer docId, Boolean deleted, Integer domainId) void
updateSubtopic
(Date statLastPost, Long forumId, Integer domainId) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, save
Methods inherited from interface sk.iway.iwcm.system.datatable.spring.DomainIdRepository
findAllByDomainId, findAllByDomainId, findFirstByIdAndDomainId
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, saveAll, saveAllAndFlush, saveAndFlush
Methods inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor
count, findAll, findAll, findAll, findOne
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
-
updateSubtopic
-
findByIdAndDomainIdOrderByQuestionDateAsc
-
findByIdAndDomainIdOrderByQuestionDateDesc
-
findById
- Specified by:
findById
in interfaceorg.springframework.data.repository.CrudRepository<DocForumEntity,
Long>
-
getDocForumListForumIdParentId
@Query("SELECT new sk.iway.iwcm.components.forum.jpa.DocForumIdAndParentId(fe.id, fe.parentId) FROM DocForumEntity fe WHERE fe.docId = :docId AND fe.parentId > 0 AND fe.deleted = :deleted AND fe.confirmed = :confirmed AND fe.domainId = :domainId ORDER BY fe.id ASC") List<DocForumIdAndParentId> getDocForumListForumIdParentId(@Param("docId") Integer docId, @Param("deleted") Boolean deleted, @Param("confirmed") Boolean confirmed, @Param("domainId") Integer domainId) -
getDocForumListForumIdParentIdWithRootParents
@Query("SELECT new sk.iway.iwcm.components.forum.jpa.DocForumIdAndParentId(fe.id, fe.parentId) FROM DocForumEntity fe WHERE fe.docId = :docId AND fe.deleted = :deleted AND fe.confirmed = :confirmed AND fe.domainId = :domainId ORDER BY fe.id ASC") List<DocForumIdAndParentId> getDocForumListForumIdParentIdWithRootParents(@Param("docId") Integer docId, @Param("deleted") Boolean deleted, @Param("confirmed") Boolean confirmed, @Param("domainId") Integer domainId) -
getDocForumListAsc
@Query("SELECT fe FROM DocForumEntity fe WHERE fe.docId = :docId AND fe.parentId IN :parentIds AND fe.deleted = :deleted AND fe.confirmed = :confirmed AND fe.domainId = :domainId ORDER BY fe.questionDate ASC") List<DocForumEntity> getDocForumListAsc(@Param("docId") Integer docId, @Param("parentIds") List<Integer> parentIds, @Param("deleted") Boolean deleted, @Param("confirmed") Boolean confirmed, @Param("domainId") Integer domainId) -
getDocForumListDesc
@Query("SELECT fe FROM DocForumEntity fe WHERE fe.docId = :docId AND fe.parentId IN :parentIds AND fe.deleted = :deleted AND fe.confirmed = :confirmed AND fe.domainId = :domainId ORDER BY fe.questionDate DESC") List<DocForumEntity> getDocForumListDesc(@Param("docId") Integer docId, @Param("parentIds") List<Integer> parentIds, @Param("deleted") Boolean deleted, @Param("confirmed") Boolean confirmed, @Param("domainId") Integer domainId) -
getForumStat
@Query("SELECT fe FROM DocForumEntity fe WHERE fe.docId = :docId AND fe.parentId = -1 AND fe.deleted = :deleted AND fe.domainId = :domainId ORDER BY fe.statLastPost DESC") List<DocForumEntity> getForumStat(@Param("docId") Integer docId, @Param("deleted") Boolean deleted, @Param("domainId") Integer domainId) -
findFirstByDocIdAndDomainIdOrderByQuestionDateDesc
Optional<DocForumEntity> findFirstByDocIdAndDomainIdOrderByQuestionDateDesc(Integer docId, Integer domainId)
-