Interface EmpresaRepository

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

@Repository public interface EmpresaRepository extends org.springframework.data.jpa.repository.JpaRepository<Empresa,Long>
Repositorio para gestionar las operaciones de base de datos de la entidad Empresa. Proporciona métodos para la persistencia y consulta de los datos de las empresas registradas.
  • Method Summary

    Modifier and Type
    Method
    Description
    Busca una empresa por su correo electrónico institucional.

    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

    • findByEmail

      Optional<Empresa> findByEmail(String email)
      Busca una empresa por su correo electrónico institucional. Método clave para el proceso de autenticación de administradores de empresa.
      Parameters:
      email - El correo electrónico a buscar.
      Returns:
      Un Optional que contiene la Empresa si se encuentra, o vacío en caso contrario.