package com.jasamedika.medifirst2000.dao;

import java.util.List;

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.GenericView;

/**
 * Repository class for AgamaM
 * 
 * @author Roberto
 */
@Repository("GenericViewDao")
public interface GenericViewDao extends PagingAndSortingRepository<GenericView, Integer> {

	@Query("select model from GenericView model where model.previx=:namaPrevix")
	public List<GenericView> findGenericViewByPrevix(@Param("namaPrevix") String namaPrevix);
	
//	@Query("select model from :tableName model where model.pasien.noCm=:noCm and model.registrasiPelayananPasien.tglRegistrasi=:tglInput")
//	public List<Object> findPapNoCmAndTglInput(@Param("tableName") String tableName,@Param("noCm") String noCm,@Param("tglInput") Date tglInput);
}
