package com.jasamedika.medifirst2000.dao; import java.util.Map; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; import com.jasamedika.medifirst2000.entities.Negara; @Repository("NegaraDao") public interface NegaraDao extends PagingAndSortingRepository { @Query("select new Map(model.id as id, model.namaNegara as namaNegara) from Negara model where model.id = :negaraId and model.statusEnabled is true") public Map getNegaraById(@Param("negaraId") Integer negaraId); }