Package com.skava.accounts.repository
Interface AddressesRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<AddressesEntity,
,Long> org.springframework.data.querydsl.QuerydslPredicateExecutor<AddressesEntity>
,org.springframework.data.repository.Repository<AddressesEntity,
Long>
public interface AddressesRepository
extends org.springframework.data.repository.CrudRepository<AddressesEntity,Long>, org.springframework.data.querydsl.QuerydslPredicateExecutor<AddressesEntity>
The Interface AddressesRepository extends another CrudRepository which contains all default crud operations.
AddressesRepository contains customized methods definitions for the operations in Address entity.
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptionboolean
existsByIdAndAccountId
(long id, long accountId) org.springframework.data.domain.Page<AddressesEntity>
findAll
(org.springframework.data.jpa.domain.Specification<AddressesEntity> specification, org.springframework.data.domain.Pageable pageRequest) Find all AddressesEntity based on inputfindByIdAndAccountId
(long id, long accountId) find AddressesEntity ByIdAndAccountId.findByIsDefaultAndAccountId
(boolean isDefault, long accountId) findByIsDefaultAndAccountIdMethods 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<AddressesEntity> findAll(org.springframework.data.jpa.domain.Specification<AddressesEntity> specification, org.springframework.data.domain.Pageable pageRequest) Find all AddressesEntity based on input- Parameters:
specification
- contains all search criteria like accountId=1, teamId=2pageRequest
- contains pageable information like page, size- Returns:
- the list of AddressesEntity
-
findByIdAndAccountId
find AddressesEntity ByIdAndAccountId.- Parameters:
id
- the idaccountId
- 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 Addresses id.- Returns:
- AddressesEntity
-
existsByIdAndAccountId
boolean existsByIdAndAccountId(long id, long accountId) - Parameters:
id
- the identifier of AddressesaccountId
- 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 Addresses id.- Returns:
- true, if successful
-
findByIsDefaultAndAccountId
findByIsDefaultAndAccountId- Parameters:
isDefault
- isDefaultaccountId
- accountId- Returns:
- the address
-