Package com.skava.repository
Interface ConsentRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<ConsentEntity,
,Long> org.springframework.data.jpa.repository.JpaRepository<ConsentEntity,
,Long> org.springframework.data.repository.ListCrudRepository<ConsentEntity,
,Long> org.springframework.data.repository.ListPagingAndSortingRepository<ConsentEntity,
,Long> org.springframework.data.repository.PagingAndSortingRepository<ConsentEntity,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<ConsentEntity>
,org.springframework.data.repository.Repository<ConsentEntity,
Long>
public interface ConsentRepository
extends org.springframework.data.jpa.repository.JpaRepository<ConsentEntity,Long>
This is ConsentRepository interface.
Interface for generic CRUD operations of the Consent entity.
This handles the below operations.
- Create
- Read
- Update
- Delete
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptionboolean
existsByCollectionIdAndTitle
(long collectionId, String title) This is used to check whether consent exists by title and collectionId.findByIdAndCollectionId
(long id, long collectionId) This is used to load the consent by consentId and collectionId.findIdByTitleAndCollectionId
(String title, long collectionId) This is used to load the consent by title and collectionId.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
-
findIdByTitleAndCollectionId
This is used to load the consent by title and collectionId.- Parameters:
title
- Indicates the title of the consent.collectionId
- Indicates the collection id.- Returns:
- The
Optional
ofConsentEntity
object.
-
existsByCollectionIdAndTitle
This is used to check whether consent exists by title and collectionId.- Parameters:
title
- Indicates the title of the consent.collectionId
- Indicates the collection id.- Returns:
- Boolean value true, if collection exist by title and collection id.
-
findByIdAndCollectionId
This is used to load the consent by consentId and collectionId.- Parameters:
id
- Indicates the consent id.collectionId
- Indicates the collection id.- Returns:
- The
Optional
ofConsentEntity
object.
-