1@Repository
2public interface CompanyRepository extends JpaRepository<Company, Integer> {
3 @Query("SELECT CASE WHEN COUNT(c) > 0 THEN true ELSE false END FROM Company c WHERE c.name = :companyName")
4 boolean existsByName(@Param("companyName") String companyName);
5}