package com.jasamedika.medifirst2000.dao;

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

@Repository("DraftSuratDao")
public interface DraftSuratDao extends PagingAndSortingRepository<DraftSurat, String>, JpaSpecificationExecutor<DraftSurat> {
	
	@Query("select count(p.id) from DraftSurat p ")
	public Integer getCount();

	@Query("select p from DraftSurat p where p.noRec=:noRec ")
	public DraftSurat findById(@Param("noRec") String noRec);
}
