Interface BudgetRepository

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

public interface BudgetRepository extends org.springframework.data.jpa.repository.JpaRepository<BudgetEntity,Long>
The Interface BudgetRepository extends another JpaRepository which contains all default crud operations. BudgetRepository contains customized methods definitions for the operations in Budget entity.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.data.domain.Page<BudgetEntity>
    findAll(org.springframework.data.jpa.domain.Specification<BudgetEntity> specification, org.springframework.data.domain.Pageable pageRequest)
    Find all BudgetEntity based on input.
    findAllByCostcentresId(long costCentreId)
    Find all BudgetEntity by costcentre id.
    Find all BudgetEntity by costcentre ids.
    findByIdAndCostcentresId(long id, long costCentreId)
    To check if a Contract Exists By the given id and accountId.

    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

    • findAll

      org.springframework.data.domain.Page<BudgetEntity> findAll(org.springframework.data.jpa.domain.Specification<BudgetEntity> specification, org.springframework.data.domain.Pageable pageRequest)
      Find all BudgetEntity based on input.
      Parameters:
      specification - contains all search criteria like accountId=1, teamId=2
      pageRequest - contains pageable information like page, size
      Returns:
      the list of BudgetEntity
    • findByIdAndCostcentresId

      BudgetEntity findByIdAndCostcentresId(long id, long costCentreId)
      To check if a Contract Exists By the given id and accountId.
      Parameters:
      id - the unique identifier of the Budget
      costCentreId - the cost centre id
      Returns:
      the budget entity
    • findAllByCostcentresId

      List<BudgetEntity> findAllByCostcentresId(long costCentreId)
      Find all BudgetEntity by costcentre id.
      Parameters:
      costCentreId - the cost centre id
      Returns:
      the list BudgetEntity
    • findAllByCostcentresIdIn

      List<BudgetEntity> findAllByCostcentresIdIn(List<Long> costCentreIds)
      Find all BudgetEntity by costcentre ids.
      Parameters:
      costCentreIds - the cost centre ids
      Returns:
      the list BudgetEntity