Interface UserConsentRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<UserConsentEntity,Long>, org.springframework.data.jpa.repository.JpaRepository<UserConsentEntity,Long>, org.springframework.data.repository.ListCrudRepository<UserConsentEntity,Long>, org.springframework.data.repository.ListPagingAndSortingRepository<UserConsentEntity,Long>, org.springframework.data.repository.PagingAndSortingRepository<UserConsentEntity,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<UserConsentEntity>, org.springframework.data.repository.Repository<UserConsentEntity,Long>

public interface UserConsentRepository extends org.springframework.data.jpa.repository.JpaRepository<UserConsentEntity,Long>
This is UserConsentRepository interface. Interface for generic CRUD operations of the UserConsent entity. This handles the below operations.
  • Create
  • Read
  • Update
  • Delete
Author:
Infosys Equinox
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.data.domain.Page<UserConsentEntity>
    findAllByUserId(long userId, org.springframework.data.domain.Pageable pageRequest)
    This is used to load all the user consent by userId.
    findByUserIdAndConsentId(long userId, long consentId)
    This is used to load the user consent by userId and consentId.

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Method Details

    • findByUserIdAndConsentId

      Optional<UserConsentEntity> findByUserIdAndConsentId(long userId, long consentId)
      This is used to load the user consent by userId and consentId.
      Parameters:
      userId - Indicates the id of the user.
      consentId - Indicates the consent id.
      Returns:
      The Optional of UserConsentEntity object.
    • findAllByUserId

      org.springframework.data.domain.Page<UserConsentEntity> findAllByUserId(long userId, org.springframework.data.domain.Pageable pageRequest)
      This is used to load all the user consent by userId.
      Parameters:
      userId - Indicates the user id for which user consent entity gets loaded.
      pageRequest - Holds Pageable object.
      Returns:
      The Page of UserConsentEntity object.