Interface FormItemsRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<FormItemEntity,,Long> DomainIdRepository<FormItemEntity,,Long> org.springframework.data.jpa.repository.JpaRepository<FormItemEntity,,Long> org.springframework.data.jpa.repository.JpaSpecificationExecutor<FormItemEntity>,org.springframework.data.repository.ListCrudRepository<FormItemEntity,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<FormItemEntity,,Long> org.springframework.data.repository.PagingAndSortingRepository<FormItemEntity,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<FormItemEntity>,org.springframework.data.repository.Repository<FormItemEntity,Long>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor
org.springframework.data.jpa.repository.JpaSpecificationExecutor.SpecificationFluentQuery<T extends Object> -
Method Summary
Modifier and TypeMethodDescriptioncountByFormNameAndStepIdAndSortPriorityAndIdNot(String formName, Long stepId, Integer sortPriority, Integer id) countItemsByIdAndItemFormId(String formName, Long id, String itemFormId, Integer domainId) intcountItemsThatHasType(String formName, Integer domainId, List<String> fieldTypes) voiddeleteAllByFormNameAndDomainId(String formName, Integer domainId) voiddeleteAllByFormNameAndStepIdAndDomainId(String formName, Long stepId, Integer domainId) voiddeleteAllByStepIdAndDomainId(Long stepId, Integer domainId) findAllByFormNameAndDomainId(String formName, Integer domainId) findAllByFormNameAndIdInAndDomainId(String formName, List<Long> ids, Integer domainId) findAllByFormNameAndStepIdInAndDomainId(String formName, List<Integer> stepIds, Integer domainId) findFirstByFormNameAndItemFormIdAndDomainIdOrderBySortPriorityAsc(String formName, String itemFormId, Integer domainId) findItemsToDuplicate(String formName, Long stepId, Integer domainId) getAllStepItems(Long stepId, Integer domainId) getItemFormIds(String formName, String fieldType, Integer domainId) intincrementErrorCountByItemFormIds(String formName, Integer domainId, List<String> itemFormIds) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface sk.iway.iwcm.system.datatable.spring.DomainIdRepository
findAllByDomainId, findAllByDomainId, findFirstByIdAndDomainIdMethods 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.jpa.repository.JpaSpecificationExecutor
count, count, delete, delete, exists, exists, findAll, findAll, findAll, findAll, findAll, findBy, findBy, findOne, findOne, updateMethods 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
-
deleteAllByStepIdAndDomainId
-
getAllStepItems
@Query("SELECT fie FROM FormItemEntity fie WHERE fie.stepId = :stepId AND fie.domainId = :domainId ORDER BY fie.sortPriority ASC") List<FormItemEntity> getAllStepItems(@Param("stepId") Long stepId, @Param("domainId") Integer domainId) -
getItemFormIds
-
countItemsThatHasType
-
deleteAllByFormNameAndStepIdAndDomainId
-
deleteAllByFormNameAndDomainId
-
findItemsToDuplicate
@Query("SELECT fie FROM FormItemEntity fie WHERE fie.formName = :formName AND fie.stepId = :stepId AND fie.domainId = :domainId") List<FormItemEntity> findItemsToDuplicate(@Param("formName") String formName, @Param("stepId") Long stepId, @Param("domainId") Integer domainId) -
findAllByFormNameAndDomainId
-
findFirstByFormNameAndItemFormIdAndDomainIdOrderBySortPriorityAsc
FormItemEntity findFirstByFormNameAndItemFormIdAndDomainIdOrderBySortPriorityAsc(String formName, String itemFormId, Integer domainId) -
incrementErrorCountByItemFormIds
@Transactional @Modifying @Query("UPDATE FormItemEntity fie SET fie.errorCount = COALESCE(fie.errorCount, 0) + 1 WHERE fie.formName = :formName AND fie.domainId = :domainId AND fie.itemFormId IN :itemFormIds") int incrementErrorCountByItemFormIds(@Param("formName") String formName, @Param("domainId") Integer domainId, @Param("itemFormIds") List<String> itemFormIds) -
countByFormNameAndStepIdAndSortPriorityAndIdNot
-
findAllByFormNameAndStepIdInAndDomainId
-
countItemsByIdAndItemFormId
@Query("SELECT COUNT(fie.id) FROM FormItemEntity fie WHERE fie.formName = :formName AND fie.id = :id AND fie.itemFormId = :itemFormId AND fie.domainId = :domainId") Optional<Integer> countItemsByIdAndItemFormId(@Param("formName") String formName, @Param("id") Long id, @Param("itemFormId") String itemFormId, @Param("domainId") Integer domainId) -
findAllByFormNameAndIdInAndDomainId
-