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 Type
    Method
    Description
    boolean
    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 input
    findByIdAndAccountId(long id, long accountId)
    find AddressesEntity ByIdAndAccountId.
    findByIsDefaultAndAccountId(boolean isDefault, long accountId)
    findByIsDefaultAndAccountId

    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<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=2
      pageRequest - contains pageable information like page, size
      Returns:
      the list of AddressesEntity
    • findByIdAndAccountId

      Optional<AddressesEntity> findByIdAndAccountId(long id, long accountId)
      find AddressesEntity ByIdAndAccountId.
      Parameters:
      id - the id
      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 Addresses id.
      Returns:
      AddressesEntity
    • existsByIdAndAccountId

      boolean existsByIdAndAccountId(long id, long accountId)
      Parameters:
      id - the identifier of Addresses
      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 Addresses id.
      Returns:
      true, if successful
    • findByIsDefaultAndAccountId

      List<AddressesEntity> findByIsDefaultAndAccountId(boolean isDefault, long accountId)
      findByIsDefaultAndAccountId
      Parameters:
      isDefault - isDefault
      accountId - accountId
      Returns:
      the address