Interface LPVSPullRequestRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<LPVSPullRequest,Long>, org.springframework.data.jpa.repository.JpaRepository<LPVSPullRequest,Long>, org.springframework.data.repository.ListCrudRepository<LPVSPullRequest,Long>, org.springframework.data.repository.ListPagingAndSortingRepository<LPVSPullRequest,Long>, org.springframework.data.repository.PagingAndSortingRepository<LPVSPullRequest,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<LPVSPullRequest>, org.springframework.data.repository.Repository<LPVSPullRequest,Long>

public interface LPVSPullRequestRepository extends org.springframework.data.jpa.repository.JpaRepository<LPVSPullRequest,Long>
Repository interface for managing LPVSPullRequest entities. Extends JpaRepository for basic CRUD operations.
  • Method Summary

    Modifier and Type
    Method
    Description
    Count the number of pull requests with the specified base name.
    Count the number of pull requests with the specified sender or pull request head.
    Find all pull requests with the specified base name.
    org.springframework.data.domain.Page<LPVSPullRequest>
    findByPullRequestBase(String name, org.springframework.data.domain.Pageable pageable)
    Find all pull requests with the specified base name, paginated.
    Find all pull requests with the specified sender or pull request head.
    org.springframework.data.domain.Page<LPVSPullRequest>
    findBySenderOrPullRequestHead(String name, org.springframework.data.domain.Pageable pageable)
    Find all pull requests with the specified sender or pull request head, paginated.
    findLatestByPullRequestInfo(String user, String repositoryName, String pullRequestFilesUrl, String pullRequestHead, String pullRequestBase, String sender, String status)
    Retrieves the latest LPVSPullRequest entity based on the provided criteria.

    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.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    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

    • findLatestByPullRequestInfo

      @Query("SELECT pr FROM LPVSPullRequest pr WHERE (:user IS NULL OR pr.user = :user) AND (:repositoryName IS NULL OR pr.repositoryName = :repositoryName) AND (:pullRequestFilesUrl IS NULL OR pr.pullRequestFilesUrl = :pullRequestFilesUrl) AND (:pullRequestHead IS NULL OR pr.pullRequestHead = :pullRequestHead) AND (:pullRequestBase IS NULL OR pr.pullRequestBase = :pullRequestBase) AND (:sender IS NULL OR pr.sender = :sender) AND (:status IS NULL OR pr.status = :status) ORDER BY pr.date DESC LIMIT 1") LPVSPullRequest findLatestByPullRequestInfo(@Param("user") String user, @Param("repositoryName") String repositoryName, @Param("pullRequestFilesUrl") String pullRequestFilesUrl, @Param("pullRequestHead") String pullRequestHead, @Param("pullRequestBase") String pullRequestBase, @Param("sender") String sender, @Param("status") String status)
      Retrieves the latest LPVSPullRequest entity based on the provided criteria.
      Parameters:
      user - The user associated with the pull request. If null, this parameter is ignored.
      repositoryName - The name of the repository associated with the pull request. If null, this parameter is ignored.
      pullRequestFilesUrl - The URL of the pull request files. If null, this parameter is ignored.
      pullRequestHead - The head of the pull request. If null, this parameter is ignored.
      pullRequestBase - The base of the pull request. If null, this parameter is ignored.
      sender - The sender of the pull request. If null, this parameter is ignored.
      status - The status of the pull request. If null, this parameter is ignored.
      Returns:
      The latest LPVSPullRequest entity matching the provided criteria, or null if no matching entity is found.
    • findByPullRequestBase

      org.springframework.data.domain.Page<LPVSPullRequest> findByPullRequestBase(@Param("name") String name, org.springframework.data.domain.Pageable pageable)
      Find all pull requests with the specified base name, paginated.
      Parameters:
      name - The name of the pull request base.
      pageable - The pagination information.
      Returns:
      Page of LPVSPullRequest entities with the specified base name.
    • findByPullRequestBase

      List<LPVSPullRequest> findByPullRequestBase(@Param("name") String name)
      Find all pull requests with the specified base name.
      Parameters:
      name - The name of the pull request base.
      Returns:
      List of LPVSPullRequest entities with the specified base name.
    • countByPullRequestBase

      Long countByPullRequestBase(@Param("name") String name)
      Count the number of pull requests with the specified base name.
      Parameters:
      name - The name of the pull request base.
      Returns:
      The count of pull requests with the specified base name.
    • findBySenderOrPullRequestHead

      @Query("select pr from LPVSPullRequest pr where pr.sender = :name or pr.pullRequestHead = :name") org.springframework.data.domain.Page<LPVSPullRequest> findBySenderOrPullRequestHead(@Param("name") String name, org.springframework.data.domain.Pageable pageable)
      Find all pull requests with the specified sender or pull request head, paginated.
      Parameters:
      name - The name of the sender or pull request head.
      pageable - The pagination information.
      Returns:
      Page of LPVSPullRequest entities with the specified sender or pull request head.
    • findBySenderOrPullRequestHead

      @Query("select pr from LPVSPullRequest pr where pr.sender = :name or pr.pullRequestHead = :name") List<LPVSPullRequest> findBySenderOrPullRequestHead(@Param("name") String name)
      Find all pull requests with the specified sender or pull request head.
      Parameters:
      name - The name of the sender or pull request head.
      Returns:
      List of LPVSPullRequest entities with the specified sender or pull request head.
    • countBySenderOrPullRequestHead

      @Query("select count(*) from LPVSPullRequest pr where pr.sender = :name or pr.pullRequestHead = :name") Long countBySenderOrPullRequestHead(@Param("name") String name)
      Count the number of pull requests with the specified sender or pull request head.
      Parameters:
      name - The name of the sender or pull request head.
      Returns:
      The count of pull requests with the specified sender or pull request head.