Interface FormsRepository

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

@Repository public interface FormsRepository extends FormsRepositoryInterface<FormsEntity>
  • Method Details

    • getNumberOfSubmitted

      @Query("SELECT COUNT(fe.id) FROM FormsEntity fe WHERE fe.formName = :formName AND fe.domainId = :domainId AND fe.createDate IS NOT NULL") Integer getNumberOfSubmitted(@Param("formName") String formName, @Param("domainId") Integer domainId)
    • deleteAllUserSubmitted

      @Transactional @Modifying @Query("DELETE FROM FormsEntity fe WHERE fe.formName = :formName AND fe.domainId = :domainId AND fe.userId = :userId AND fe.createDate IS NOT NULL") void deleteAllUserSubmitted(@Param("formName") String formName, @Param("domainId") Integer domainId, @Param("userId") Long userId)
    • countFormName

      @Query("SELECT COUNT(fe.id) FROM FormsEntity fe WHERE fe.formName = :formName AND fe.domainId = :domainId") Integer countFormName(@Param("formName") String formName, @Param("domainId") Integer domainId)
    • setUnknownFormType

      @Transactional @Modifying @Query("UPDATE FormsEntity fe SET fe.formType = \'unknown\' WHERE (fe.formType IS NULL OR fe.formType = \'\') AND fe.createDate IS NULL") void setUnknownFormType()