/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.yihu.wlyy.repository.patient;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.yihu.wlyy.entity.patient.PatientMedicalRecordsItem;

public interface PatientMedicalRecordsItemDao extends PagingAndSortingRepository<PatientMedicalRecordsItem, Long>, JpaSpecificationExecutor<PatientMedicalRecordsItem> {

	@Query("select a from PatientMedicalRecordsItem a where a.record = ?1")
	List<PatientMedicalRecordsItem> findByRecord(String record);
	
	@Query("select a from PatientMedicalRecordsItem a where a.record = ?1")
	PatientMedicalRecordsItem findOneByRecord(String record);

}
