Interface CostCentreRepository

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

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

    Modifier and Type
    Method
    Description
    boolean
    existsByIdAndAccountId(long id, long accountId)
    To check if a Contract Exists By the given id and accountId.
    org.springframework.data.domain.Page<CostCentreEntity>
    findAll(org.springframework.data.jpa.domain.Specification<CostCentreEntity> specification, org.springframework.data.domain.Pageable pageRequest)
    Find all CostCentreEntities based on inputs.
    org.springframework.data.domain.Page<CostCentreEntity>
    findAllByAccountId(long accountId, org.springframework.data.domain.Pageable pageRequest)
    Find CostCentreEntities by account id.
    findByIdAndAccountId(long id, long accountId)
    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

    Methods inherited from interface org.springframework.data.querydsl.QuerydslPredicateExecutor

    count, exists, findAll, findAll, findAll, findAll, findAll, findBy, findOne
  • Method Details

    • findAll

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

      Optional<CostCentreEntity> findByIdAndAccountId(long id, long accountId)
      To check if a Contract Exists By the given id and accountId.
      Parameters:
      id - the unique identifier of CostCentre.
      accountId - It refers to the id of the account which is a unique identifier. An account should exists for the given account id, and also the account should be associated with the given CostCentre id.
      Returns:
      the CostCentreEntity
    • findAllByAccountId

      org.springframework.data.domain.Page<CostCentreEntity> findAllByAccountId(long accountId, org.springframework.data.domain.Pageable pageRequest)
      Find CostCentreEntities by account id.
      Parameters:
      accountId - It refers to the id of the account which is a unique identifier. An account should exists for the given account id, and also the account should be associated with the given CostCentre id.
      pageRequest - the pageRequest
      Returns:
      the list of CostCentreEntity
    • existsByIdAndAccountId

      boolean existsByIdAndAccountId(long id, long accountId)
      To check if a Contract Exists By the given id and accountId.
      Parameters:
      id - the id
      accountId - the account id
      Returns:
      boolean true/false