Package com.skava.accounts.repository
Interface AccountBuyerRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<AccountBuyerEntity,
,Long> org.springframework.data.querydsl.QuerydslPredicateExecutor<AccountBuyerEntity>
,org.springframework.data.repository.Repository<AccountBuyerEntity,
Long>
public interface AccountBuyerRepository
extends org.springframework.data.repository.CrudRepository<AccountBuyerEntity,Long>, org.springframework.data.querydsl.QuerydslPredicateExecutor<AccountBuyerEntity>
The Interface AccountRepository extends another CrudRepository which contains all default crud operations.
AccountRepository contains customized methods definitions for the operations in Account buyer entity.
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptionboolean
existsByAccountIdAndUserId
(long accountId, String userId) boolean
existsByIdAndAccountId
(long id, long accountId) Exists by id and accountId.findAccountIdByUserId
(String userId) findAccountIdByUserIdAndAccountCollectionId
(String userId, long collectionId) org.springframework.data.domain.Page<AccountBuyerEntity>
findAll
(org.springframework.data.jpa.domain.Specification<AccountsEntity> specification, org.springframework.data.domain.Pageable pageRequest) Method used to search all accountbuyers from db .org.springframework.data.domain.Page<AccountBuyerEntity>
findAllByAccountId
(org.springframework.data.domain.Pageable pageRequest, Long accountId) Find all by accountIdfindByIdAndAccountId
(long id, Long accountId) Method used to search all accountbuyers from db by id and accountId.findByTeamId
(long teamId) Find by team id.findByTeamIdAndAccountId
(long teamId, long accountId) Find by team id and accountId.findByUserIdAndAccountIdAndAccountCollectionId
(String userId, Long accountId, long collectionId) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
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<AccountBuyerEntity> findAll(org.springframework.data.jpa.domain.Specification<AccountsEntity> specification, org.springframework.data.domain.Pageable pageRequest) Method used to search all accountbuyers from db .- Parameters:
specification
- contains all search criteria like accountId=1, teamId=2pageRequest
- contains pageable information like page, size- Returns:
- the page of AccountBuyerEntity
-
findByIdAndAccountId
Method used to search all accountbuyers from db by id and accountId.- Parameters:
id
- the id of accountbuyeraccountId
- 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 AccountBuyer id.- Returns:
- the multiple AccountBuyerEntities
-
findAllByAccountId
org.springframework.data.domain.Page<AccountBuyerEntity> findAllByAccountId(org.springframework.data.domain.Pageable pageRequest, Long accountId) Find all by accountId- Parameters:
pageRequest
- contains pageable information like page, sizeaccountId
- 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 AccountBuyer id.- Returns:
- the AccountBuyerEntitiy
-
existsByIdAndAccountId
boolean existsByIdAndAccountId(long id, long accountId) Exists by id and accountId.- Parameters:
id
- the idaccountId
- 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 AccountBuyer id.- Returns:
- true, if successful
-
findByTeamId
Find by team id.- Parameters:
teamId
- the id of the team which is a unique identifier. An account should exists for the given account id, and also the account should be associated with the given AccountBuyer id.- Returns:
- the list of AccountBuyerEntity
-
findByTeamIdAndAccountId
Find by team id and accountId.- 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 AccountBuyer id.teamId
- the id of the team which is a unique identifier. An account should exists for the given account id, and also the account should be associated with the given AccountBuyer id.- Returns:
- the list of AccountBuyerEntity
-
findAccountIdByUserId
- Parameters:
userId
- is a string variable contains multiple userIds with comma separated- Returns:
- list of AccountBuyerEntity
-
existsByAccountIdAndUserId
- 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 AccountBuyer id.userId
- is a string variable contains multiple userIds with comma separated- Returns:
- true or false
-
findAccountIdByUserIdAndAccountCollectionId
List<AccountBuyerEntity> findAccountIdByUserIdAndAccountCollectionId(String userId, long collectionId) -
findByUserIdAndAccountIdAndAccountCollectionId
Optional<AccountBuyerEntity> findByUserIdAndAccountIdAndAccountCollectionId(String userId, Long accountId, long collectionId) - Parameters:
userId
- is a string variable contains multiple userIds with comma separatedaccountId
- 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 AccountBuyer id.- Returns:
- AccountBuyerEntities
-