Interface FormStepsRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<FormStepEntity,Long>, DomainIdRepository<FormStepEntity,Long>, org.springframework.data.jpa.repository.JpaRepository<FormStepEntity,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<FormStepEntity>, org.springframework.data.repository.PagingAndSortingRepository<FormStepEntity,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<FormStepEntity>, org.springframework.data.repository.Repository<FormStepEntity,Long>

@Repository public interface FormStepsRepository extends DomainIdRepository<FormStepEntity,Long>
  • Method Details

    • findAllByFormNameAndDomainId

      List<FormStepEntity> findAllByFormNameAndDomainId(String formName, Integer domainId)
    • findAllByFormNameAndDomainIdOrderBySortPriorityAsc

      List<FormStepEntity> findAllByFormNameAndDomainIdOrderBySortPriorityAsc(String formName, Integer domainId)
    • getMultistepFormNames

      @Query("SELECT DISTINCT fse.formName FROM FormStepEntity fse WHERE fse.domainId = :domainId") List<String> getMultistepFormNames(@Param("domainId") Integer domainId)
    • deleteAllByFormNameAndDomainId

      @Transactional @Modifying void deleteAllByFormNameAndDomainId(String formName, Integer domainId)
    • getFirstStepId

      @Query("SELECT fse.id FROM FormStepEntity fse WHERE fse.formName = :formName AND fse.currentPosition = 1 AND fse.domainId = :domainId") Optional<Long> getFirstStepId(@Param("formName") String formName, @Param("domainId") Integer domainId)
    • getValidStep

      @Query("SELECT fse FROM FormStepEntity fse WHERE fse.formName = :formName AND fse.id = :stepId AND fse.domainId = :domainId") Optional<FormStepEntity> getValidStep(@Param("formName") String formName, @Param("stepId") Long stepId, @Param("domainId") Integer domainId)
    • getStepByPosition

      @Query("SELECT fse FROM FormStepEntity fse WHERE fse.formName = :formName AND fse.currentPosition = :currentPosition AND fse.domainId = :domainId") Optional<FormStepEntity> getStepByPosition(@Param("formName") String formName, @Param("currentPosition") Integer currentPosition, @Param("domainId") Integer domainId)
    • getFormNameByStepId

      @Query("SELECT fse.formName FROM FormStepEntity fse WHERE fse.id = :stepId AND fse.domainId = :domainId") Optional<String> getFormNameByStepId(@Param("stepId") Long stepId, @Param("domainId") Integer domainId)