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 Detail

      • findByConsentStatusIn

        List<ConsentEntity> findByConsentStatusIn​(Set<de.adorsys.psd2.xs2a.core.consent.ConsentStatus> statuses)
      • 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)