Interface ConsentJpaRepository
-
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<ConsentEntity,Long>,org.springframework.data.jpa.repository.JpaSpecificationExecutor<ConsentEntity>,org.springframework.data.repository.Repository<ConsentEntity,Long>
public interface ConsentJpaRepository extends org.springframework.data.repository.CrudRepository<ConsentEntity,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<ConsentEntity>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<ConsentEntity>findByConsentStatusIn(Set<de.adorsys.psd2.xs2a.core.consent.ConsentStatus> statuses)Optional<ConsentEntity>findByExternalId(String externalId)List<ConsentEntity>findOldConsentsByNewConsentParams(Set<String> psuIds, String tppAuthorisationNumber, String instanceId, String newConsentId, Set<de.adorsys.psd2.xs2a.core.consent.ConsentStatus> consentStatuses)List<ConsentEntity>findUsedNonRecurringConsents(Set<de.adorsys.psd2.xs2a.core.consent.ConsentStatus> consentStatuses, LocalDate currentDate)
-
-
-
Method Detail
-
findByConsentStatusIn
List<ConsentEntity> findByConsentStatusIn(Set<de.adorsys.psd2.xs2a.core.consent.ConsentStatus> statuses)
-
findByExternalId
Optional<ConsentEntity> findByExternalId(String externalId)
-
findOldConsentsByNewConsentParams
@Query("select c from consent c join c.psuDataList psuList where psuList.psuId in :psuIds and c.tppInformation.tppInfo.authorisationNumber = :authorisationNumber and c.instanceId = :instanceId and c.consentStatus in :consentStatuses and c.externalId <> :newConsentId") List<ConsentEntity> findOldConsentsByNewConsentParams(@Param("psuIds") Set<String> psuIds, @Param("authorisationNumber") String tppAuthorisationNumber, @Param("instanceId") String instanceId, @Param("newConsentId") String newConsentId, @Param("consentStatuses") Set<de.adorsys.psd2.xs2a.core.consent.ConsentStatus> consentStatuses)
-
findUsedNonRecurringConsents
@Query("select c from consent c join c.usages u where c.recurringIndicator = false and c.consentStatus in :consentStatuses and u.usageDate < :currentDate") List<ConsentEntity> findUsedNonRecurringConsents(@Param("consentStatuses") Set<de.adorsys.psd2.xs2a.core.consent.ConsentStatus> consentStatuses, @Param("currentDate") LocalDate currentDate)
-
-