Interface DoacaoRepositorio

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

public interface DoacaoRepositorio extends org.springframework.data.jpa.repository.JpaRepository<Doacao,Long>
Interface de repositório para a entidade Doacao.
Author:
Edielson Assis
  • Method Summary

    Modifier and Type
    Method
    Description
    Retorna uma lista de doações confirmadas.
    Retorna uma lista de doações associadas a um usuário pelo CPF.

    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

    • findByConfirmarDoacaoTrue

      List<Doacao> findByConfirmarDoacaoTrue()
      Retorna uma lista de doações confirmadas.
      Returns:
      Lista de doações confirmadas.
    • findByUsuarioCpf

      @Query("SELECT d FROM Doacao d WHERE d.doador.cpf = :cpf") List<Doacao> findByUsuarioCpf(@Param("cpf") String cpf)
      Retorna uma lista de doações associadas a um usuário pelo CPF.
      Parameters:
      cpf - O CPF do usuário.
      Returns:
      Lista de doações associadas ao usuário.