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

@Repository("UnitCostDao")
public interface UnitCostDao extends PagingAndSortingRepository<UnitCost, Integer> {

	@Query("select model from UnitCost model")
	List<UnitCost> findAllUnitCost();
	
	@Query("select model from UnitCost model where model.id=:id")
	UnitCost findUnitCostById(@Param("id") Integer id);
	

}
