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 Type
    Method
    Description
    boolean
    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 inputs
    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.
    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=2
      pageRequest - contains pageable information like page, size
      collectionId - 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=2
      pageRequest - the page request
      Returns:
      the list of AccountsEntity
    • findByIdAndCollectionId

      Optional<AccountsEntity> findByIdAndCollectionId(long id, Long collectionId)
      Find by id and collection id.
      Parameters:
      id - the id
      collectionId - 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

      Optional<AccountsEntity> findStatusByIdAndCollectionId(long id, long collectionId)
      Find status by id and collection id.
      Parameters:
      id - the id
      collectionId - 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

      boolean existsByIdAndCollectionId(long id, Long collectionId)
      Exists by id and collection id.
      Parameters:
      id - the id
      collectionId - 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

      List<AccountsEntity> findByTypeId(long typeId)
      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