Interface FileArchiveRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<FileArchivatorBean,
,Long> DomainIdRepository<FileArchivatorBean,
,Long> org.springframework.data.jpa.repository.JpaRepository<FileArchivatorBean,
,Long> org.springframework.data.jpa.repository.JpaSpecificationExecutor<FileArchivatorBean>
,org.springframework.data.repository.PagingAndSortingRepository<FileArchivatorBean,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<FileArchivatorBean>
,org.springframework.data.repository.Repository<FileArchivatorBean,
Long>
@Repository
public interface FileArchiveRepository
extends DomainIdRepository<FileArchivatorBean,Long>
-
Method Summary
Modifier and TypeMethodDescriptioncountReferencesToMain
(String referenceToMain, Integer domainId) org.springframework.data.domain.Page<FileArchivatorBean>
findAllByIdInAndReferenceIdAndReferenceToMainAndDomainId
(Integer[] ids, Integer referenceId, String referenceToMain, Integer domainId, org.springframework.data.domain.Pageable pageable) findAllByReferenceIdAndDomainId
(Long referenceId, int domainId) findAllByReferenceIdAndUploadedAndDomainId
(Long referenceId, int uploaded, int domainId) org.springframework.data.domain.Page<FileArchivatorBean>
findAllByReferenceIdAndUploadedAndDomainId
(Long referenceId, int uploaded, int domainId, org.springframework.data.domain.Pageable pageable) findAllByReferenceToMainAndDomainId
(String referenceToMain, Integer domainId) findAllByReferenceToMainAndReferenceIdAndDomainId
(String referenceToMain, Integer referenceId, Integer domainId) findAllByUploadedAndDomainId
(Integer uploaded, Integer domainId) findAllMainFilesUploadedNotPatternIdsIn
(List<Integer> globalIds, Integer domainId, org.springframework.data.domain.Pageable pageable) findAllMainFilesUploadedNotPatternsVirtualPathLike
(String pattern, Integer domainId) findDistinctAllByCategoryLikeAndFilePathLikeAndDomainId
(String category, String filePath, int domainId) findDistinctAllByProductLikeAndFilePathLikeAndDomainId
(String product, String filePath, int domainId) findDistinctReferenceIds
(Integer domainId) findFirstByReferenceIdOrderByOrderIdAsc
(int orderId) findIdByFilePathAndFileName
(String filePath, String fileName, Integer domainId) getDistinctCategory
(Integer domainId) getDistinctProduct
(Integer domainId) getReferenceToMain
(Long id, Integer domainId) void
updateCategory
(String oldCategory, String newCategory, Integer domainId) void
updateProduct
(String oldProduct, String newProduct, Integer domainId) void
updateReferenceToMain
(Long referenceId, String referenceToMain, Integer domainId) void
updateReferenceToMain
(String oldReferenceToMain, String newReferenceToMain, Integer domainId) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, 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
-
findDistinctAllByProductLikeAndFilePathLikeAndDomainId
List<FileArchivatorBean> findDistinctAllByProductLikeAndFilePathLikeAndDomainId(String product, String filePath, int domainId) -
findDistinctAllByCategoryLikeAndFilePathLikeAndDomainId
List<FileArchivatorBean> findDistinctAllByCategoryLikeAndFilePathLikeAndDomainId(String category, String filePath, int domainId) -
findAllByReferenceIdAndUploadedAndDomainId
org.springframework.data.domain.Page<FileArchivatorBean> findAllByReferenceIdAndUploadedAndDomainId(Long referenceId, int uploaded, int domainId, org.springframework.data.domain.Pageable pageable) -
findAllByReferenceIdAndUploadedAndDomainId
List<FileArchivatorBean> findAllByReferenceIdAndUploadedAndDomainId(Long referenceId, int uploaded, int domainId) -
findAllByReferenceIdAndDomainId
-
findFirstByReferenceIdOrderByOrderIdAsc
-
findDistinctReferenceIds
-
getDistinctCategory
-
getDistinctProduct
-
updateCategory
@Transactional @Modifying @Query("UPDATE FileArchivatorBean fab SET fab.category = :newCategory WHERE fab.category = :oldCategory AND fab.domainId = :domainId") void updateCategory(@Param("oldCategory") String oldCategory, @Param("newCategory") String newCategory, @Param("domainId") Integer domainId) -
updateProduct
-
findAllMainFilesUploadedNotPatternsVirtualPathLike
@Query("SELECT fab FROM FileArchivatorBean fab WHERE CONCAT(fab.filePath, fab.fileName) LIKE :pattern AND fab.domainId = :domainId AND fab.referenceId = -1 AND fab.uploaded = -1 GROUP BY CONCAT(fab.filePath, fab.fileName)") List<FileArchivatorBean> findAllMainFilesUploadedNotPatternsVirtualPathLike(@Param("pattern") String pattern, @Param("domainId") Integer domainId) -
findAllByReferenceToMainAndDomainId
List<FileArchivatorBean> findAllByReferenceToMainAndDomainId(String referenceToMain, Integer domainId) -
findAllByReferenceToMainAndReferenceIdAndDomainId
List<FileArchivatorBean> findAllByReferenceToMainAndReferenceIdAndDomainId(String referenceToMain, Integer referenceId, Integer domainId) -
findAllByUploadedAndDomainId
-
updateReferenceToMain
@Transactional @Modifying @Query("UPDATE FileArchivatorBean fab SET fab.referenceToMain = :newReferenceToMain WHERE fab.referenceToMain = :oldReferenceToMain AND fab.domainId = :domainId") void updateReferenceToMain(@Param("oldReferenceToMain") String oldReferenceToMain, @Param("newReferenceToMain") String newReferenceToMain, @Param("domainId") Integer domainId) -
updateReferenceToMain
@Transactional @Modifying @Query("UPDATE FileArchivatorBean fab SET fab.referenceToMain = :referenceToMain WHERE fab.referenceId = :referenceId AND fab.domainId = :domainId") void updateReferenceToMain(@Param("referenceId") Long referenceId, @Param("referenceToMain") String referenceToMain, @Param("domainId") Integer domainId) -
getReferenceToMain
-
countReferencesToMain
-
findAllByIdInAndReferenceIdAndReferenceToMainAndDomainId
org.springframework.data.domain.Page<FileArchivatorBean> findAllByIdInAndReferenceIdAndReferenceToMainAndDomainId(Integer[] ids, Integer referenceId, String referenceToMain, Integer domainId, org.springframework.data.domain.Pageable pageable) -
findAllMainFilesUploadedNotPatternIdsIn
@Query("SELECT fab FROM FileArchivatorBean fab WHERE fab.globalId IN :globalIds AND fab.referenceId = -1 AND fab.uploaded = -1 AND (fab.referenceToMain IS NULL OR fab.referenceToMain = \'\') AND fab.domainId = :domainId") List<FileArchivatorBean> findAllMainFilesUploadedNotPatternIdsIn(@Param("globalIds") List<Integer> globalIds, @Param("domainId") Integer domainId, org.springframework.data.domain.Pageable pageable) -
findIdByFilePathAndFileName
-