package com.jasamedika.medifirst2000.dao;

import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import com.jasamedika.medifirst2000.entities.Pasien;

/**
 * Repository class for Pasien
 * 
 * @author Roberto
 */
@Repository("PasienMDao")
public interface PasienMDao extends PagingAndSortingRepository<Pasien, Integer> {
	// custom query
//	@Query("select model from Pasien model where model.namapasien=:nama")
//	public List<Pasien> findPasienByNama(@Param("nama") String nama);
//
//	// custom query WITH pagination
//	@Query("select model from Pasien model where model.namapasien=:nama")
//	public Page<Pasien> findPagePasienByNama(@Param("nama") String nama,
//			Pageable Page);
//
//	// custom query return map example
//	@Query("select new map(model.id as id, model.namapasien as nama) from Pasien model")
//	public List<Map<String, String>> getMapPasien();
//
//	// native query example
//	@Query(value = "SELECT " + "namapasien AS NAMAPASIEN, namapanggilan AS NAMAPANGGILAN"
//			+ "FROM Pasien", nativeQuery = true)
//	List<Object[]> getNativePasien();

}
