Interface AdocaoRepositorio

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

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

    Modifier and Type
    Method
    Description
    Retorna uma lista de adoções a serem confirmadas.
    Retorna uma lista de adoções associadas a um usuário através do 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

    • findByConfirmarAdocaoTrue

      List<Adocao> findByConfirmarAdocaoTrue()
      Retorna uma lista de adoções a serem confirmadas.
      Returns:
      Lista de adoções a serem confirmadas.
    • findByUsuarioCpf

      @Query("SELECT a FROM Adocao a WHERE a.adotante.cpf = :cpf") List<Adocao> findByUsuarioCpf(@Param("cpf") String cpf)
      Retorna uma lista de adoções associadas a um usuário através do CPF.
      Parameters:
      cpf - O CPF do adotante.
      Returns:
      Lista de adoções associadas ao usuário.