Interface FundProjRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<FundProj,Integer>, JpaRepository<FundProj,Integer>, org.springframework.data.repository.ListCrudRepository<FundProj,Integer>, org.springframework.data.repository.ListPagingAndSortingRepository<FundProj,Integer>, org.springframework.data.repository.PagingAndSortingRepository<FundProj,Integer>, org.springframework.data.repository.query.QueryByExampleExecutor<FundProj>, org.springframework.data.repository.Repository<FundProj,Integer>

public interface FundProjRepository extends JpaRepository<FundProj,Integer>
Author:
TingXD (chen19990627)
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.data.domain.Page<FundProj>
    findProjectByCategory(Integer categoryID, org.springframework.data.domain.Pageable pgb)
     
    org.springframework.data.domain.Page<FundProj>
    findProjectByCategoryAndStatus(Integer categoryID, org.springframework.data.domain.Pageable pgb)
     
    org.springframework.data.domain.Page<FundProj>
    findProjectByStatus(org.springframework.data.domain.Pageable pgb)
     
     

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    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

    • findTopProjectById

      @Query(value="select top(1) * from fundingProj order by projectID desc", nativeQuery=true) FundProj findTopProjectById()
    • findProjectByCategory

      @Query(value="SELECT * FROM fundingProj WHERE categoryID = :i", nativeQuery=true) org.springframework.data.domain.Page<FundProj> findProjectByCategory(@Param("i") Integer categoryID, org.springframework.data.domain.Pageable pgb)
    • findProjectByCategoryAndStatus

      @Query(value="SELECT * FROM fundingProj WHERE categoryID = :i AND status=1", nativeQuery=true) org.springframework.data.domain.Page<FundProj> findProjectByCategoryAndStatus(@Param("i") Integer categoryID, org.springframework.data.domain.Pageable pgb)
    • findProjectByStatus

      @Query(value="SELECT * FROM fundingProj WHERE status=1", nativeQuery=true) org.springframework.data.domain.Page<FundProj> findProjectByStatus(org.springframework.data.domain.Pageable pgb)