package com.jasamedika.medifirst2000.dao;

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

@Repository("DokumenMasukDao")
public interface DokumenMasukDao extends PagingAndSortingRepository<DokumenMasuk, String> {

	@Query("select model from DokumenMasuk model where model.noRec=:noRec ")
	public DokumenMasuk findByNoRec(@Param("noRec") String noRec);

	@Query("select model from DokumenMasuk model "
			+ " left join model.kddokumen d where d.id=:idDokumen ")
	public DokumenMasuk findByIdDokumen(@Param("idDokumen") Integer idDokumen);
}
