Package com.skava.accounts.repository
Interface AccountsRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<AccountsEntity,
,Long> org.springframework.data.querydsl.QuerydslPredicateExecutor<AccountsEntity>
,org.springframework.data.repository.Repository<AccountsEntity,
Long>
public interface AccountsRepository
extends org.springframework.data.repository.CrudRepository<AccountsEntity,Long>, org.springframework.data.querydsl.QuerydslPredicateExecutor<AccountsEntity>
The Interface AccountsRepository extends another CrudRepository which contains all default crud operations.
AccountsRepository contains customized methods definitions for the operations in Accounts entity.
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptionboolean
existsByIdAndCollectionId
(long id, Long collectionId) Exists by id and collection id.org.springframework.data.domain.Page<AccountsEntity>
findAll
(org.springframework.data.jpa.domain.Specification<AccountsEntity> specification, org.springframework.data.domain.Pageable pageRequest) Find all AccountsEntity by given inputsorg.springframework.data.domain.Page<AccountsEntity>
findAllByCollectionId
(org.springframework.data.jpa.domain.Specification<AccountsEntity> specification, org.springframework.data.domain.Pageable pageRequest, long collectionId) Find all.findByIdAndCollectionId
(long id, Long collectionId) Find by id and collection id.findByTypeId
(long typeId) This function is used to find all the accounts associated with the given accountTypeId.findStatusByIdAndCollectionId
(long id, long collectionId) Find status by id and collection id.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
-
findAllByCollectionId
org.springframework.data.domain.Page<AccountsEntity> findAllByCollectionId(org.springframework.data.jpa.domain.Specification<AccountsEntity> specification, org.springframework.data.domain.Pageable pageRequest, long collectionId) Find all.- Parameters:
specification
- contains all search criteria like accountId=1, teamId=2pageRequest
- contains pageable information like page, sizecollectionId
- It refers to the id of the collection which is a unique identifier. An collection should exists for the given collection id, and also the collection should be associated with the given Account id.- Returns:
- the list of AccountsEntity
-
findAll
org.springframework.data.domain.Page<AccountsEntity> findAll(org.springframework.data.jpa.domain.Specification<AccountsEntity> specification, org.springframework.data.domain.Pageable pageRequest) Find all AccountsEntity by given inputs- Parameters:
specification
- contains all search criteria like accountId=1, teamId=2pageRequest
- the page request- Returns:
- the list of AccountsEntity
-
findByIdAndCollectionId
Find by id and collection id.- Parameters:
id
- the idcollectionId
- It refers to the id of the collection which is a unique identifier. An collection should exists for the given collection id, and also the collection should be associated with the given Account id.- Returns:
- the AccountsEntity
-
findStatusByIdAndCollectionId
Find status by id and collection id.- Parameters:
id
- the idcollectionId
- It refers to the id of the collection which is a unique identifier. An collection should exists for the given collection id, and also the collection should be associated with the given Account id.- Returns:
- the AccountsEntity
-
existsByIdAndCollectionId
Exists by id and collection id.- Parameters:
id
- the idcollectionId
- It refers to the id of the collection which is a unique identifier. An collection should exists for the given collection id, and also the collection should be associated with the given Account id.- Returns:
- true, if successful
-
findByTypeId
This function is used to find all the accounts associated with the given accountTypeId.- Parameters:
typeId
- It refers to the unique identifier of the AccountType- Returns:
- a list of objects of type
AccountsEntity
-