Package com.skava.accounts.repository
Interface TeamRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<TeamEntity,
,Long> org.springframework.data.jpa.repository.JpaRepository<TeamEntity,
,Long> org.springframework.data.repository.ListCrudRepository<TeamEntity,
,Long> org.springframework.data.repository.ListPagingAndSortingRepository<TeamEntity,
,Long> org.springframework.data.repository.PagingAndSortingRepository<TeamEntity,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<TeamEntity>
,org.springframework.data.querydsl.QuerydslPredicateExecutor<TeamEntity>
,org.springframework.data.repository.Repository<TeamEntity,
Long>
public interface TeamRepository
extends org.springframework.data.jpa.repository.JpaRepository<TeamEntity,Long>, org.springframework.data.querydsl.QuerydslPredicateExecutor<TeamEntity>
The Interface TeamRepository extends another JpaRepository which contains all default JpaRepository operations.
TeamRepository contains customized methods definitions for the operations in Team entity.
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptionboolean
existsByIdAndAccountId
(long teamId, long accountId) Exists by id and account id.org.springframework.data.domain.Page<TeamEntity>
findAll
(org.springframework.data.jpa.domain.Specification<TeamEntity> specification, org.springframework.data.domain.Pageable pageRequest) Find TeamEntity based on input.org.springframework.data.domain.Page<TeamEntity>
findAllByAccountId
(long accountId, org.springframework.data.domain.Pageable pageRequest) Find all by account id.findByCostCentreId
(long costCentreId) This function is used to load all the Team Which are associated with the given cost centre.findByIdAndAccountId
(long id, long accountId) To check if a TeamEntity 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<TeamEntity> findAll(org.springframework.data.jpa.domain.Specification<TeamEntity> specification, org.springframework.data.domain.Pageable pageRequest) Find TeamEntity based on input.- Parameters:
specification
- contains all search criteria like accountId=1, teamId=2pageRequest
- contains pageable information like page, size- Returns:
- the list of TeamEntity
-
findByIdAndAccountId
To check if a TeamEntity Exists By the given id and accountId.- Parameters:
id
- the unique identifier of team.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 team id.- Returns:
- the optional
-
findAllByAccountId
org.springframework.data.domain.Page<TeamEntity> findAllByAccountId(long accountId, org.springframework.data.domain.Pageable pageRequest) Find all 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 team id.pageRequest
- the page request- Returns:
- the list of TeamEntity
-
existsByIdAndAccountId
boolean existsByIdAndAccountId(long teamId, long accountId) Exists by id and account id.- Parameters:
teamId
- the unique identifier of team.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 team id.- Returns:
- true, if successful
-
findByCostCentreId
This function is used to load all the Team Which are associated with the given cost centre.- Parameters:
costCentreId
- It refers to the id of the cost centre which is a unique identifier.- Returns:
- a list of
TeamEntity
-