Interface CompanyRepository

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

@Repository public interface CompanyRepository extends org.springframework.data.jpa.repository.JpaRepository<Company,Long>
Repositório para Empresas.

Propósito: Gerenciar a persistência de entidades jurídicas (CNPJ, Nome, CVM).

  • Method Summary

    Modifier and Type
    Method
    Description
    Busca empresa por CNPJ exato.

    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

    • findByCnpj

      Optional<Company> findByCnpj(String cnpj)
      Busca empresa por CNPJ exato.
      Parameters:
      cnpj - O CNPJ da empresa.
      Returns:
      A empresa, se encontrada.