Package com.skava.accounts.repository
Interface PaymentsRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<PaymentsEntity,
,Long> org.springframework.data.repository.Repository<PaymentsEntity,
Long>
public interface PaymentsRepository
extends org.springframework.data.repository.CrudRepository<PaymentsEntity,Long>
The Interface PaymentsRepository extends another CrudRepository which contains all default crud operations.
PaymentsRepository contains customized methods definitions for the operations in Payment entity.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
existsByIdAndAccountId
(long id, long accountId) Checks Payment exists or notorg.springframework.data.domain.Page<PaymentsEntity>
findAll
(org.springframework.data.domain.Pageable pageRequest) Find PaymentsEntity based on inputs.org.springframework.data.domain.Page<PaymentsEntity>
findAllByAccountId
(long accountId, org.springframework.data.domain.Pageable pageRequest) Find all.findByIdAndAccountId
(long id, long accountId) Find by id and account id.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
-
Method Details
-
findAll
org.springframework.data.domain.Page<PaymentsEntity> findAll(org.springframework.data.domain.Pageable pageRequest) Find PaymentsEntity based on inputs.- Parameters:
pageRequest
- contains pageable information like page, size- Returns:
- the PaymentsEntity
-
findAllByAccountId
org.springframework.data.domain.Page<PaymentsEntity> findAllByAccountId(long accountId, org.springframework.data.domain.Pageable pageRequest) Find all.- 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 Payment id.pageRequest
- contains pageable information like page, size- Returns:
- the list of PaymentsEntity
-
findByIdAndAccountId
Find by id and account id.- Parameters:
id
- the unique identifier of document.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 Payment id.- Returns:
- the PaymentsEntity
-
existsByIdAndAccountId
boolean existsByIdAndAccountId(long id, long accountId) Checks Payment exists or not- Parameters:
id
- the unique identifier of document.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 Payment id.- Returns:
- true, if successful
-