package com.jasamedika.medifirst2000.dao;

import java.util.Map;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
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.JenisJabatan;

@Repository("JenisJabatanDao")
public interface JenisJabatanDao extends PagingAndSortingRepository<JenisJabatan, Integer>, JpaSpecificationExecutor<JenisJabatan> {

	@Query("SELECT new Map (model.id as id,model.jenisJabatan as jenisJabatan) "
			+ "from JenisJabatan model where model.id =:id and model.statusEnabled is true")
	Map<String,Object> getJenisJabatanById(@Param("id")Integer id);
	
}
