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

@Repository("GeneratedMasterDao")
public interface GeneratedMasterDao extends PagingAndSortingRepository<ListMaster, String> {

	@Query("select model from ListMaster model where model.statusEnabled = True")
	public List<ListMaster> getMaster();

	@Query("update ListMaster model set model.statusEnabled = False where model.namaEntity=:entity")
	public List<ListMaster> changeStatus(@Param("entity") String entity);

}
