Skip to content
Snippets Groups Projects
Verified Commit 566e3198 authored by Adam Krídl's avatar Adam Krídl
Browse files

Add CountryRepository

parent b5487b79
No related branches found
No related tags found
No related merge requests found
package cz.muni.fi.pa165.core.data.repository.country;
import cz.muni.fi.pa165.core.data.domain.Country;
import cz.muni.fi.pa165.core.data.repository.common.BaseRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import java.util.Optional;
@Repository
public interface CountryRepository extends BaseRepository<Country, Long> {
@Query("SELECT c FROM Country c WHERE c.name = :name")
Optional<Country> findByName(@Param("name") String name);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment